@@ -157,28 +157,31 @@ module.exports = function(webpackEnv) {
157
157
: isEnvDevelopment && 'cheap-module-source-map' ,
158
158
// These are the "entry points" to our application.
159
159
// This means they will be the "root" imports that are included in JS bundle.
160
- entry : isEnvDevelopment && ! shouldUseReactRefresh ? [
161
- // Include an alternative client for WebpackDevServer. A client's job is to
162
- // connect to WebpackDevServer by a socket and get notified about changes.
163
- // When you save a file, the client will either apply hot updates (in case
164
- // of CSS changes), or refresh the page (in case of JS changes). When you
165
- // make a syntax error, this client will display a syntax error overlay.
166
- // Note: instead of the default WebpackDevServer client, we use a custom one
167
- // to bring better experience for Create React App users. You can replace
168
- // the line below with these two lines if you prefer the stock client:
169
- //
170
- // require.resolve('webpack-dev-server/client') + '?/',
171
- // require.resolve('webpack/hot/dev-server'),
172
- //
173
- // When using the experimental react-refresh integration,
174
- // the webpack plugin takes care of injecting the dev client for us.
175
- webpackDevClientEntry ,
176
- // Finally, this is your app's code:
177
- paths . appIndexJs ,
178
- // We include the app code last so that if there is a runtime error during
179
- // initialization, it doesn't blow up the WebpackDevServer client, and
180
- // changing JS code would still trigger a refresh.
181
- ] : paths . appIndexJs ,
160
+ entry :
161
+ isEnvDevelopment && ! shouldUseReactRefresh
162
+ ? [
163
+ // Include an alternative client for WebpackDevServer. A client's job is to
164
+ // connect to WebpackDevServer by a socket and get notified about changes.
165
+ // When you save a file, the client will either apply hot updates (in case
166
+ // of CSS changes), or refresh the page (in case of JS changes). When you
167
+ // make a syntax error, this client will display a syntax error overlay.
168
+ // Note: instead of the default WebpackDevServer client, we use a custom one
169
+ // to bring better experience for Create React App users. You can replace
170
+ // the line below with these two lines if you prefer the stock client:
171
+ //
172
+ // require.resolve('webpack-dev-server/client') + '?/',
173
+ // require.resolve('webpack/hot/dev-server'),
174
+ //
175
+ // When using the experimental react-refresh integration,
176
+ // the webpack plugin takes care of injecting the dev client for us.
177
+ webpackDevClientEntry ,
178
+ // Finally, this is your app's code:
179
+ paths . appIndexJs ,
180
+ // We include the app code last so that if there is a runtime error during
181
+ // initialization, it doesn't blow up the WebpackDevServer client, and
182
+ // changing JS code would still trigger a refresh.
183
+ ]
184
+ : paths . appIndexJs ,
182
185
output : {
183
186
// The build folder.
184
187
path : isEnvProduction ? paths . appBuild : undefined ,
0 commit comments