Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"uglifyjs-webpack-plugin": "1.2.5",
"url-loader": "1.0.1",
"webpack": "4.8.3",
"webpack-dev-server": "3.1.4",
"webpack-dev-server": "4.8.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading webpack-dev-server to version 4.x is a major breaking change that will cause the development server to fail with the current configuration.

The following files need to be updated to be compatible with webpack-dev-server v4:

  1. packages/react-scripts/scripts/start.js:

    • The WebpackDevServer constructor arguments have been swapped. On line 109, new WebpackDevServer(compiler, serverConfig) must be changed to new WebpackDevServer(serverConfig, compiler).
  2. packages/react-scripts/config/webpackDevServer.config.js:

    • disableHostCheck and public: These are removed. Use allowedHosts instead. The logic for setting this needs to be migrated carefully from the old options.
    • clientLogLevel: Renamed to client.logging. For example, clientLogLevel: 'none' becomes client: { logging: 'none' }.
    • contentBase: Removed. Use static: { directory: ... }.
    • watchContentBase: Removed. Use static: { watch: ... }.
    • publicPath: Moved to devMiddleware.publicPath.
    • quiet: Removed. This is now the default behavior for logging.
    • overlay: Moved to client.overlay.
    • before: Renamed to onBeforeSetupMiddleware. The function now receives the devServer instance, so you'd use devServer.app instead of the app argument.

Without these changes, the application's start script will break. This is a critical issue that needs to be addressed along with the version bump.

"webpack-manifest-plugin": "2.0.3",
"whatwg-fetch": "2.0.4"
},
Expand Down