about summary refs log tree commit diff
path: root/bin/webpack-dev-server
diff options
context:
space:
mode:
Diffstat (limited to 'bin/webpack-dev-server')
-rwxr-xr-xbin/webpack-dev-server14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/webpack-dev-server b/bin/webpack-dev-server
index cf701102a..251f65e8e 100755
--- a/bin/webpack-dev-server
+++ b/bin/webpack-dev-server
@@ -1,11 +1,7 @@
 #!/usr/bin/env ruby
-# frozen_string_literal: true
-#
-# This file was generated by Bundler.
-#
-# The application 'webpack-dev-server' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
+
+ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
+ENV["NODE_ENV"]  ||= ENV["NODE_ENV"] || "development"
 
 require "pathname"
 ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
@@ -14,4 +10,6 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
 require "rubygems"
 require "bundler/setup"
 
-load Gem.bin_path("webpacker", "webpack-dev-server")
+require "webpacker"
+require "webpacker/dev_server_runner"
+Webpacker::DevServerRunner.run(ARGV)