Skip to content

Commit 2433d52

Browse files
authored
Added to remove webpacker configs for docs of Switch from Webpacker (#121)
1 parent 163218e commit 2433d52

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/switch_from_webpacker.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,28 @@ If you would like to minimize the diff between Webpacker and jsbundling-rails:
6464
- `./config/webpack/production.js`
6565
- `./config/webpack/test.js`
6666

67-
2. Remove Webpacker gem
67+
2. Remove Webpacker configs
68+
69+
```diff
70+
# Remove from your config/initializers/assets.rb
71+
-# Add Yarn node_modules folder to the asset load path.
72+
-Rails.application.config.assets.paths << Rails.root.join('node_modules')
73+
```
74+
75+
```diff
76+
# Remove from your config/initializers/content_security_policy.rb
77+
-# # If you are using webpack-dev-server then specify webpack-dev-server host
78+
-# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
79+
```
80+
81+
3. Remove Webpacker gem
6882

6983
```diff
7084
# Remove from your Gemfile
7185
- gem 'webpacker'
7286
```
7387

74-
3. Run `./bin/bundle install`
88+
4. Run `./bin/bundle install`
7589

7690
## 3. Install dependencies
7791

0 commit comments

Comments
 (0)