Closed
Description
Bug report
- I have a tiny repo that uses webpack-dev-server.
- I use
webpack serve
and view the page in a browser. - This works fine with webpack-dev-server 4.11.1. But when I upgrade to 4.12, I get an error page.
Actual Behavior
With 4.12, I get an error page:
Uncaught ReferenceError: window is not defined
at eval (webpack://monaco-utf8-length-incremental/./node_modules/webpack-dev-server/client/overlay.js?:247:56)
Expected Behavior
With 4.11.1, the expected page loads. It's a page with the Monaco text editor that shows a character count at the bottom.
How Do We Reproduce?
To get the expected behavior (webpack-dev-server 4.11.1):
git clone https://github.com/cakoose/monaco-utf8-length-incremental
git checkout 8ed7c9430db129788418dc20f4a39eb089164c14
yarn run start
- Point your browser at http://localhost:8080
- See that the page loads
To the the error behavior (webpack-dev-server 4.12):
- Edit "package.json" and edit the "webpack-dev-server" depenency from "4.11.1" to "4.12"
yarn install
yarn run start
- Point your browser at http://localhost:8080
- See the error page.
Please paste the results of npx webpack-cli info
here, and mention other relevant information
System:
OS: macOS 12.6.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 256.44 MB / 32.00 GB
Binaries:
Node: 18.14.1 - ~/.volta/tools/image/node/18.14.1/bin/node
Yarn: 3.4.1 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 9.3.1 - ~/.volta/tools/image/node/18.14.1/bin/npm
Browsers:
Chrome: 111.0.5563.64
Edge: 111.0.1661.44
Firefox: 111.0
Safari: 16.3
Packages:
css-loader: 6.7.3 => 6.7.3
file-loader: 6.2.0 => 6.2.0
html-webpack-plugin: 5.5.0 => 5.5.0
style-loader: 3.3.2 => 3.3.2
ts-loader: 9.4.2 => 9.4.2
webpack: 5.76.2 => 5.76.2
webpack-cli: 5.0.1 => 5.0.1
webpack-dev-server: 4.12.0 => 4.12.0
Metadata
Metadata
Assignees
Labels
No labels