Skip to content

Commit e9d48af

Browse files
committed
Switch to the stock webpack dev client (for now)
For now, we need to use the stock client because the custom dev client relies on `window.location` to find the dev server. However, since we host our apps inside a back-end app, the dev server is running somewhere else. See #6 for some ideas on how to go back to the custom dev client.
1 parent d4b90ee commit e9d48af

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: packages/react-scripts/config/webpack.config.dev.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,15 @@ module.exports = function(publicPath) {
6161
// Note: instead of the default WebpackDevServer client, we use a custom one
6262
// to bring better experience for Create React App users. You can replace
6363
// the line below with these two lines if you prefer the stock client:
64-
// require.resolve('webpack-dev-server/client') + '?/',
65-
// require.resolve('webpack/hot/dev-server'),
66-
require.resolve('react-dev-utils/webpackHotDevClient'),
64+
// ZEAL: For now, we need to use the stock client because the custom dev
65+
// client relies on `window.location` to find the dev server. However,
66+
// since we host our apps inside a back-end app, the dev server is running
67+
// somewhere else.
68+
// See https://github.com/CodingZeal/create-react-app/issues/6 for some
69+
// ideas on how to go back to the custom dev client.
70+
require.resolve('webpack-dev-server/client') + '?' + publicPath,
71+
require.resolve('webpack/hot/dev-server'),
72+
// require.resolve('react-dev-utils/webpackHotDevClient'),
6773
// We ship a few polyfills by default:
6874
require.resolve('./polyfills'),
6975
// Finally, this is your app's code:

0 commit comments

Comments
 (0)