Skip to content

Commit d9ad255

Browse files
authored
Make dev server binstub optional (#1024)
1 parent d9cf446 commit d9ad255

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/tasks/webpacker/check_binstubs.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace :webpacker do
22
desc "Verifies that webpack & webpack-dev-server are present."
33
task :check_binstubs do
4-
unless Bundler.which("webpack") && Bundler.which("webpack-dev-server")
4+
unless Bundler.which("webpack")
55
$stderr.puts "webpack binstubs not found.\n"\
66
"Have you run rails webpacker:install ?\n"\
77
"Make sure the bin directory or binstubs are not included in .gitignore\n"\

lib/webpacker/compiler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def record_compilation_digest
5353
def run_webpack
5454
logger.info "Compiling…"
5555

56-
sterr, stdout, status = Open3.capture3(webpack_env, "#{RbConfig.ruby} ./bin/webpack")
56+
sterr, stdout, status = Open3.capture3(webpack_env, "bundle exec webpack")
5757

5858
if status.success?
5959
logger.info "Compiled all packs in #{config.public_output_path}"

0 commit comments

Comments
 (0)