Skip to content

Commit 7daff97

Browse files
authored
Fix hot reloading for WebpackDevServer after eject (#1721)
1 parent be53fa5 commit 7daff97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/react-scripts/config/webpack.config.dev.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ module.exports = {
123123
{
124124
exclude: [
125125
/\.html$/,
126-
/\.(js|jsx)$/,
126+
// We have to write /\.(js|jsx)(\?.*)?$/ rather than just /\.(js|jsx)$/
127+
// because you might change the hot reloading server from the custom one
128+
// to Webpack's built-in webpack-dev-server/client?/, which would not
129+
// get properly excluded by /\.(js|jsx)$/ because of the query string.
130+
// Webpack 2 fixes this, but for now we include this hack.
131+
// https://github.com/facebookincubator/create-react-app/issues/1713
132+
/\.(js|jsx)(\?.*)?$/,
127133
/\.css$/,
128134
/\.json$/,
129135
/\.svg$/

0 commit comments

Comments
 (0)