Skip to content
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

Webpack 5 live reload not working #49

Closed
ivanbacher opened this issue Mar 8, 2021 · 9 comments
Closed

Webpack 5 live reload not working #49

ivanbacher opened this issue Mar 8, 2021 · 9 comments

Comments

@ivanbacher
Copy link
Contributor

Created a new app using npx makes aurelia and picked the template with routes. Live reload doesn't seem to be working. Reading the webpack 5 docs it should be turned on by default.

@ivanbacher ivanbacher changed the title Webpack 5 live reolad not working Webpack 5 live reload not working Mar 8, 2021
@3cp 3cp closed this as completed in e3e4a31 Mar 8, 2021
@3cp
Copy link
Member

3cp commented Mar 8, 2021

Somehow, webpack 5 is released quite a while, but webpack-dev-server for webpack 5 is still not for production.

@3cp
Copy link
Member

3cp commented Mar 8, 2021

The beta webpack-dev-server seems caused some issue on CI. I will investigate when I got more time.

@3cp
Copy link
Member

3cp commented Mar 9, 2021

dev-server v4 beta caused lot more problem. I will revert to v3 for now.

@3cp 3cp reopened this Mar 9, 2021
@3cp
Copy link
Member

3cp commented Mar 9, 2021

webpack-dev-server v3 supposes to work with webpack 5. (v3 added webpack5 support since v3.10.0).

This failed watch mode might be due to some new version of webpack/webpack-cli/webpack-dev-server.

@3cp
Copy link
Member

3cp commented Mar 10, 2021

Somehow with latest v3 dev-server, there is no more [WDS] websocket connection in browser, that's probably why live reload is not working. I have not find the combination of webpack/webpack-dev-server versions to bring it back to normal.

@ivanbacher
Copy link
Contributor Author

Thanks for taking a look. Adding the following to webpack config seems to work:

target: 'web'

@3cp
Copy link
Member

3cp commented Mar 10, 2021

Awesome!

@3cp
Copy link
Member

3cp commented Mar 10, 2021

Webpack doc said target:web is the default 😓
No idea how did they break this.

@3cp
Copy link
Member

3cp commented Mar 10, 2021

closed by #52

@3cp 3cp closed this as completed Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants