Skip to content

Commit 5fa5a4e

Browse files
Specify webpack-dev-server to be v3 (#3121)
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`.
1 parent c43f55f commit 5fa5a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/install/template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
run "yarn add webpack@#{webpack_version} webpack-cli@#{webpack_cli_version}"
5252

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

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

0 commit comments

Comments
 (0)