Skip to content

Allow liveReload to be configurable in dev server #3154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
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: 2 additions & 0 deletions lib/install/config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ development:
port: 3035
# Hot Module Replacement updates modules while the application is running without a full reload
hmr: false
# Defaults to the inverse of hmr. Uncomment to manually set this.
# live_reload: true
client:
# Should we show a full-screen overlay in the browser when there are compiler errors or warnings?
overlay: true
Expand Down
7 changes: 6 additions & 1 deletion package/environments/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ let devConfig = {
}

if (runningWebpackDevServer) {
let liveReload = !devServer.hmr
if (devServer.live_reload !== undefined) {
liveReload = devServer.live_reload
}

const devServerConfig = {
devMiddleware: {
publicPath
Expand All @@ -22,7 +27,7 @@ if (runningWebpackDevServer) {
port: devServer.port,
https: devServer.https,
hot: devServer.hmr,
liveReload: !devServer.hmr,
liveReload,
historyApiFallback: { disableDotRule: true },
headers: devServer.headers,
static: {
Expand Down