Skip to content

Webpacker 6: missing overlay errors (solved in webpack-dev-server 4) #2938

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

Closed
tagliala opened this issue Feb 25, 2021 · 1 comment
Closed

Comments

@tagliala
Copy link
Contributor

tagliala commented Feb 25, 2021

edit: should be caused by webpack/webpack-dev-server#2786 and fixed in webpack-dev-server v4

edit2: I can confirm that with the main branch of webpack-dev-server and some edits to development.js, overlay errors are back


Hi,

I don't know if this is an issue with webpacker itself. With webpacker 5, I was able to see lint errors on the front-end, now I just get "failed to compile" error

How to replicate

  1. Create application
$ rails _6.1.3_ new test-webpacker6-webpack-dev-server --skip-active-record --skip-javascript
$ cd test-webpacker6-webpack-dev-server
$ echo "gem 'webpacker', git: 'https://github.com/rails/webpacker.git'" >> Gemfile
$ bundle
$ rails webpacker:install
$ sed -i '3i\ \ root "pages#home"' config/routes.rb
$ sed -i '10i\ \ \ \ <%= javascript_pack_tag "application" %>' app/views/layouts/application.html.erb
$ rails g controller Pages home
  1. Launch bin/webpack-dev-server
  2. Launch the server rails s and navigate to http://localhost:3000/
  3. Save application.js to check that hot reload works ("Hello World from Webpacker" appears in the console)
  4. Make a syntax error in application.js
  5. Save application.js

Before (Webpacker 5)

image

After (Webpacker 6)

image

I can still see errors in webpack-dev-server console

image

Ref: #2994

@tagliala tagliala changed the title Webpacker 6: show lint errors on the front-end after hot reload Webpacker 6: missing errors on the front-end after hot reload Feb 25, 2021
@tagliala tagliala changed the title Webpacker 6: missing errors on the front-end after hot reload Webpacker 6: missing overlay errors Feb 27, 2021
@tagliala tagliala changed the title Webpacker 6: missing overlay errors Webpacker 6: missing overlay errors (solved in webpack-dev-server 4) Aug 1, 2021
@dhh
Copy link
Member

dhh commented Aug 25, 2021

Upgraded to webpack-dev-server 4.

@dhh dhh closed this as completed Aug 25, 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