Skip to content

Commit

Permalink
Specify webpack-dev-server to be v3 (#3121)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
adrianbautista committed Aug 20, 2021
1 parent c43f55f commit 5fa5a4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/install/template.rb
Expand Up @@ -51,7 +51,7 @@
run "yarn add webpack@#{webpack_version} webpack-cli@#{webpack_cli_version}"

say "Installing dev server for live reloading"
run "yarn add --dev webpack-dev-server"
run "yarn add --dev webpack-dev-server@^3"

if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR > 1
say "You need to allow webpack-dev-server host as allowed origin for connect-src.", :yellow
Expand Down

4 comments on commit 5fa5a4e

@h0jeZvgoxFepBQ2C
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you release a new version with this change included? Thx!

@leastbad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We needed this to come out 25 days ago...

@h0jeZvgoxFepBQ2C
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we too, please release a new version! @adrianbautista Thank you!

@leastbad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we too, please release a new version! adrianbautista Thank you!

It's out, now: https://www.npmjs.com/package/@rails/webpacker 🎈

Please sign in to comment.