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-server6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/webpack-dev-server b/bin/webpack-dev-server
index faa69f078..a931a9b7f 100755
--- a/bin/webpack-dev-server
+++ b/bin/webpack-dev-server
@@ -12,4 +12,8 @@ require "bundler/setup"
 
 require "webpacker"
 require "webpacker/dev_server_runner"
-Webpacker::DevServerRunner.run(ARGV)
+
+APP_ROOT = File.expand_path("..", __dir__)
+Dir.chdir(APP_ROOT) do
+  Webpacker::DevServerRunner.run(ARGV)
+end