File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,14 +142,14 @@ npm install remix-development-tools -D
142142+ process.env.NODE_ENV === "development" ? [{ rel: "stylesheet", href: rdtStylesheet }] : [],
143143+ ]
144144
145- + let devTools = null ;
145+ + let AppExport = App ;
146146// This imports the dev tools only if you're in development
147147+ if(process.env.NODE_ENV === 'development') {
148148+ const { withDevTools } = await import("remix-development-tools");
149- + devTools = withDevTools
149+ + AppExport = withDevTools(AppExport);
150150+ }
151- // Conditionally wraps the app with the dev tools
152- + export default devTools ? devTools(App) : App ;
151+
152+ + export default AppExport ;
153153
154154```
155155If you're using CJS instead of ESM you can do the following instead:
@@ -158,9 +158,9 @@ If you're using CJS instead of ESM you can do the following instead:
158158if(process.env.NODE_ENV === 'development') {
159159- const { withDevTools } = await import("remix-development-tools");
160160+ const { withDevTools } = require("remix-development-tools");
161- devTools = withDevTools
161+ AppExport = withDevTools
162162}
163- export default devTools ? devTools(App) : App ;
163+ export default AppExport ;
164164
165165```
166166
You can’t perform that action at this time.
0 commit comments