Skip to content

Commit cfd2635

Browse files
gaearonathill
authored andcommitted
Fix hot reloading for WebpackDevServer after eject (facebook#1721)
1 parent 7a1873c commit cfd2635

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
@@ -159,7 +159,13 @@ module.exports = {
159159
{
160160
exclude: [
161161
/\.html$/,
162-
/\.(js|jsx)$/,
162+
// We have to write /\.(js|jsx)(\?.*)?$/ rather than just /\.(js|jsx)$/
163+
// because you might change the hot reloading server from the custom one
164+
// to Webpack's built-in webpack-dev-server/client?/, which would not
165+
// get properly excluded by /\.(js|jsx)$/ because of the query string.
166+
// Webpack 2 fixes this, but for now we include this hack.
167+
// https://github.com/facebookincubator/create-react-app/issues/1713
168+
/\.(js|jsx)(\?.*)?$/,
163169
/\.css$/,
164170
/\.json$/,
165171
/\.bmp$/,

0 commit comments

Comments
 (0)