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

Specify webpack-dev-server to be v3 #3121

Merged
merged 1 commit into from
Aug 20, 2021
Merged

Conversation

adrianbautista
Copy link

@adrianbautista adrianbautista commented Aug 19, 2021

Otherwise when using Webpacker v5, it will install webpack-dev-server v4 which then requires @webpack-cli/serve to also be installed to properly run bin/webpack-dev-server.

When using Webpacker v5 with Webpack v4 and trying to run bin/webpack-dev-server:

$ bin/webpack-dev-server
The command moved into a separate package: @webpack-cli/serve
Would you like to install serve? (That will run npm install -D @webpack-cli/serve) (yes/NO) :

Otherwise when using Webpacker v5, it will install webpack-dev-server v4 which then requires `@webpack-cli/serve` to also be installed to properly run `bin/webpack-dev-server`.
@dhh dhh merged commit 5fa5a4e into rails:5-x-stable Aug 20, 2021
@DavidColby
Copy link

Would it be possible to get a new release out with this change?

Creating a new Rails 6.1 application results in a broken webpack-dev-server since the latest release of webpacker (5.4.2) does not include the change in this PR. Figuring out what's going on with the error loop can be tricky for folks who are new to Rails or who are coming to Rails 6 for the first time from an older, webpacker-less version of Rails.

Recreate the issue with:

rails new some_new_app
bin/webpack-dev-server # Enter the error loop this PR fixes

@dhh
Copy link
Member

dhh commented Sep 14, 2021

Yeah, should do that.

nachiket87 added a commit to nachiket87/webpacker that referenced this pull request Nov 4, 2022
As per rails#3121

updating webpack-dev-server will result in version 4 which causes breakage that is hard to debug. Update readme to only update webpack-dev-server within version 3 to prevent developers from having to debug the issue with webpack-cli/serve
nachiket87 added a commit to nachiket87/webpacker that referenced this pull request Nov 4, 2022
As per rails#3121

updating webpack-dev-server will result in version 4 which causes breakage that is hard to debug. Update readme to only update webpack-dev-server within version 3 to prevent developers from having to debug the issue with webpack-cli/serve
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

Successfully merging this pull request may close these issues.

3 participants