Skip to content

Commit 2494bf4

Browse files
committed
Readme update
1 parent b7c9ee8 commit 2494bf4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
```
155155
If 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:
158158
if(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

0 commit comments

Comments
 (0)