-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Bug report
Actual Behavior
When including the client manually via an entry point (instead of using the webpack devServer config object), the overlay
and progress
options are not configurable (logging
, hot
, and liveReload
are configurable).
Expected Behavior
Expect an entry point configuration like:
{
app: "./index.js",
client: "webpack-dev-server/client/index.js?hot=false&live-reload=true&progress=true&overlay=true"
}
to set the progress
and overlay
client options to true, as it does forliveReload
.
How Do We Reproduce?
Use the above entrypoint config for Webpack, with the devServer
config set as:
devServer: {
client: false,
hot: false,
}
See e.g. these docs for more info: https://webpack.js.org/guides/hot-module-replacement/#via-the-nodejs-api
Please paste the results of npx webpack-cli info
here, and mention other relevant information
FWIW I am configuring the client
manually since I am exporting two Webpack configurations (one for the main app and one for the service worker). Webpack uses the first devServer
config for all configs, but injecting the hot/client assets into the service worker causes issues. This is probably a separate bug to take up with webpack, but in the meantime this manual setup works around the issue, I'd just also still like to have the error overlay.
> $ npx webpack-cli ⬡ 16.13.0 [±fixreload ●]
NudgeWeb:
assets by path *.js 6.69 MiB
asset nudge.js 6.42 MiB [emitted] (name: nudge) 1 related asset
asset client.js 215 KiB [emitted] (name: client) 1 related asset
asset hot.js 58.5 KiB [emitted] (name: hot) 1 related asset
asset assets/favicon.png 86 KiB [emitted]
asset nudge.png 86 KiB [emitted] [from: src/img/nudge.png] [copied]
asset index.html 348 bytes [emitted]
orphan modules 3.82 MiB [orphan] 2236 modules
runtime modules 77.5 KiB 32 modules
cacheable modules 5.63 MiB
modules by path ./node_modules/ 5.52 MiB 658 modules
modules by path ./src/ 111 KiB
modules by path ./src/net/ 29.4 KiB 29 modules
modules by path ./src/*.tsx 40.2 KiB 18 modules
modules by path ./src/state/*.ts 14.9 KiB 5 modules
modules by path ./src/util/*.ts 2.36 KiB 3 modules
modules by path ./src/*.css 15.5 KiB 2 modules
modules by path ./src/bg/*.ts 9.03 KiB
./src/bg/NudgeServiceWorker.ts 7.53 KiB [built] [code generated]
./src/bg/events.ts 1.49 KiB [built] [code generated]
./index.tsx 405 bytes [built] [code generated]
data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4= 658 bytes [built] [code generated]
LOG from favicons-webpack-plugin
<i> generate only a single favicon for fast compilation time in development mode. This behaviour can be changed by setting the favicon mode option.
NudgeWeb (webpack 5.61.0) compiled successfully in 26056 ms
SW:
asset sw.js 15.2 KiB [emitted] (name: sw) 1 related asset
runtime modules 670 bytes 3 modules
cacheable modules 7.84 KiB
./src/bg/worker.ts 514 bytes [built] [code generated]
./src/bg/lifecycle.ts 1.91 KiB [built] [code generated]
./src/bg/events.ts 1.49 KiB [built] [code generated]
./src/bg/emit.ts 929 bytes [built] [code generated]
./src/bg/push.ts 2.38 KiB [built] [code generated]
./src/bg/log.ts 655 bytes [built] [code generated]
SW (webpack 5.61.0) compiled successfully in 15212 ms