Skip to content

Commit

Permalink
Use guard-webpacker to start webpacker server
Browse files Browse the repository at this point in the history
  • Loading branch information
dsandstrom committed Sep 17, 2021
1 parent 9379856 commit 1cc0d07
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'guard-livereload', '~> 2.5', require: false
gem 'guard-webpacker', '~> 0.2.1'
# Access an interactive console on exception pages or by calling 'console'
# anywhere in the code.
gem 'web-console', '>= 4.1.0'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ GEM
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
guard-webpacker (0.2.1)
guard (>= 2)
guard-compat (~> 1.0)
http_parser.rb (0.6.0)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -352,6 +355,7 @@ DEPENDENCIES
guard-livereload (~> 2.5)
guard-rails (~> 0.8.1)
guard-rspec (~> 4.7.3)
guard-webpacker (~> 0.2.1)
kaminari (~> 1.2)
listen (~> 3.3)
pg (~> 1.2.3)
Expand Down
11 changes: 11 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ group :frontend do
watch('Gemfile.lock')
watch(%r{^(config|lib)/.*})
end

### Guard::Webpacker
# available options:
# - :bin (defaults to "webpack-dev-server") to run
# - :watch (defaults to "default") can be an array
# - :colors (defaults to 1)
# - :progress
guard :webpacker do
watch('config/webpacker.yml')
watch(%r{^config/webpacker/(.+)$})
end
end

group :backend do
Expand Down
2 changes: 1 addition & 1 deletion config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ development:
dev_server:
https: false
host: localhost
port: 3035
port: 3037
# Hot Module Replacement updates modules while the application is running without a full reload
hmr: false
client:
Expand Down

0 comments on commit 1cc0d07

Please sign in to comment.