webpacker 4.0.7 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.node-version +1 -1
- data/.rubocop.yml +2 -1
- data/.travis.yml +10 -20
- data/CHANGELOG.md +243 -137
- data/Gemfile +1 -0
- data/Gemfile.lock +84 -62
- data/README.md +52 -149
- data/docs/css.md +15 -4
- data/docs/deployment.md +40 -11
- data/docs/docker.md +33 -14
- data/docs/engines.md +53 -3
- data/docs/es6.md +19 -1
- data/docs/integrations.md +220 -0
- data/docs/troubleshooting.md +37 -9
- data/docs/typescript.md +10 -8
- data/docs/webpack-dev-server.md +1 -1
- data/docs/webpack.md +18 -3
- data/gemfiles/{Gemfile-rails.4.2.x → Gemfile-rails.6.0.x} +1 -1
- data/lib/install/bin/webpack +0 -1
- data/lib/install/bin/webpack-dev-server +0 -1
- data/lib/install/coffee.rb +1 -1
- data/lib/install/config/babel.config.js +10 -10
- data/lib/install/config/webpacker.yml +2 -1
- data/lib/install/elm.rb +1 -1
- data/lib/install/erb.rb +2 -2
- data/lib/install/examples/angular/hello_angular/polyfills.ts +2 -2
- data/lib/install/examples/react/babel.config.js +16 -14
- data/lib/install/examples/svelte/app.svelte +11 -0
- data/lib/install/examples/svelte/hello_svelte.js +20 -0
- data/lib/install/loaders/elm.js +9 -6
- data/lib/install/loaders/svelte.js +9 -0
- data/lib/install/loaders/typescript.js +1 -1
- data/lib/install/svelte.rb +29 -0
- data/lib/install/template.rb +2 -2
- data/lib/install/typescript.rb +1 -1
- data/lib/install/vue.rb +1 -1
- data/lib/tasks/installers.rake +1 -0
- data/lib/tasks/webpacker.rake +2 -0
- data/lib/tasks/webpacker/check_node.rake +14 -7
- data/lib/tasks/webpacker/check_yarn.rake +16 -9
- data/lib/tasks/webpacker/clean.rake +25 -0
- data/lib/tasks/webpacker/clobber.rake +8 -4
- data/lib/tasks/webpacker/compile.rake +2 -10
- data/lib/tasks/webpacker/yarn_install.rake +5 -1
- data/lib/webpacker.rb +9 -1
- data/lib/webpacker/commands.rb +53 -1
- data/lib/webpacker/compiler.rb +15 -8
- data/lib/webpacker/configuration.rb +9 -1
- data/lib/webpacker/dev_server.rb +1 -1
- data/lib/webpacker/dev_server_proxy.rb +2 -8
- data/lib/webpacker/dev_server_runner.rb +4 -4
- data/lib/webpacker/env.rb +1 -1
- data/lib/webpacker/helper.rb +39 -13
- data/lib/webpacker/manifest.rb +4 -4
- data/lib/webpacker/railtie.rb +6 -0
- data/lib/webpacker/version.rb +1 -1
- data/package.json +38 -38
- data/package/__tests__/config.js +0 -23
- data/package/config.js +2 -10
- data/package/config_types/config_list.js +3 -3
- data/package/config_types/config_object.js +1 -1
- data/package/environments/__tests__/base.js +10 -0
- data/package/environments/base.js +14 -3
- data/package/environments/development.js +1 -5
- data/package/environments/production.js +12 -0
- data/package/rules/babel.js +1 -1
- data/package/rules/node_modules.js +2 -2
- data/package/rules/sass.js +3 -2
- data/package/utils/__tests__/get_style_rule.js +9 -0
- data/package/utils/deep_merge.js +5 -5
- data/package/utils/get_style_rule.js +7 -12
- data/package/utils/helpers.js +9 -9
- data/test/command_test.rb +6 -0
- data/test/compiler_test.rb +5 -6
- data/test/configuration_test.rb +36 -27
- data/test/dev_server_test.rb +22 -0
- data/test/helper_test.rb +34 -0
- data/test/manifest_test.rb +37 -6
- data/test/rake_tasks_test.rb +17 -0
- data/test/test_app/app/javascript/packs/multi_entry.css +4 -0
- data/test/test_app/app/javascript/packs/multi_entry.js +4 -0
- data/test/test_app/bin/webpack +0 -1
- data/test/test_app/bin/webpack-dev-server +0 -1
- data/test/test_app/config/webpacker.yml +1 -0
- data/test/test_app/public/packs/manifest.json +3 -0
- data/webpacker.gemspec +5 -3
- data/yarn.lock +2684 -1846
- metadata +48 -12
- data/gemfiles/Gemfile-rails.5.0.x +0 -9
- data/gemfiles/Gemfile-rails.5.1.x +0 -9
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,68 +1,82 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
webpacker (
|
5
|
-
activesupport (>=
|
4
|
+
webpacker (5.0.0)
|
5
|
+
activesupport (>= 5.2)
|
6
6
|
rack-proxy (>= 0.6.1)
|
7
|
-
railties (>=
|
7
|
+
railties (>= 5.2)
|
8
|
+
semantic_range (>= 2.3.0)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
actioncable (
|
13
|
-
actionpack (=
|
13
|
+
actioncable (6.0.1)
|
14
|
+
actionpack (= 6.0.1)
|
14
15
|
nio4r (~> 2.0)
|
15
16
|
websocket-driver (>= 0.6.1)
|
16
|
-
|
17
|
-
actionpack (=
|
18
|
-
|
19
|
-
|
17
|
+
actionmailbox (6.0.1)
|
18
|
+
actionpack (= 6.0.1)
|
19
|
+
activejob (= 6.0.1)
|
20
|
+
activerecord (= 6.0.1)
|
21
|
+
activestorage (= 6.0.1)
|
22
|
+
activesupport (= 6.0.1)
|
23
|
+
mail (>= 2.7.1)
|
24
|
+
actionmailer (6.0.1)
|
25
|
+
actionpack (= 6.0.1)
|
26
|
+
actionview (= 6.0.1)
|
27
|
+
activejob (= 6.0.1)
|
20
28
|
mail (~> 2.5, >= 2.5.4)
|
21
29
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (
|
23
|
-
actionview (=
|
24
|
-
activesupport (=
|
30
|
+
actionpack (6.0.1)
|
31
|
+
actionview (= 6.0.1)
|
32
|
+
activesupport (= 6.0.1)
|
25
33
|
rack (~> 2.0)
|
26
34
|
rack-test (>= 0.6.3)
|
27
35
|
rails-dom-testing (~> 2.0)
|
28
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
29
|
-
|
30
|
-
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
+
actiontext (6.0.1)
|
38
|
+
actionpack (= 6.0.1)
|
39
|
+
activerecord (= 6.0.1)
|
40
|
+
activestorage (= 6.0.1)
|
41
|
+
activesupport (= 6.0.1)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
actionview (6.0.1)
|
44
|
+
activesupport (= 6.0.1)
|
31
45
|
builder (~> 3.1)
|
32
46
|
erubi (~> 1.4)
|
33
47
|
rails-dom-testing (~> 2.0)
|
34
|
-
rails-html-sanitizer (~> 1.
|
35
|
-
activejob (
|
36
|
-
activesupport (=
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
+
activejob (6.0.1)
|
50
|
+
activesupport (= 6.0.1)
|
37
51
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (
|
39
|
-
activesupport (=
|
40
|
-
activerecord (
|
41
|
-
activemodel (=
|
42
|
-
activesupport (=
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
activerecord (=
|
52
|
+
activemodel (6.0.1)
|
53
|
+
activesupport (= 6.0.1)
|
54
|
+
activerecord (6.0.1)
|
55
|
+
activemodel (= 6.0.1)
|
56
|
+
activesupport (= 6.0.1)
|
57
|
+
activestorage (6.0.1)
|
58
|
+
actionpack (= 6.0.1)
|
59
|
+
activejob (= 6.0.1)
|
60
|
+
activerecord (= 6.0.1)
|
47
61
|
marcel (~> 0.3.1)
|
48
|
-
activesupport (
|
62
|
+
activesupport (6.0.1)
|
49
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
64
|
i18n (>= 0.7, < 2)
|
51
65
|
minitest (~> 5.1)
|
52
66
|
tzinfo (~> 1.1)
|
53
|
-
|
67
|
+
zeitwerk (~> 2.2)
|
54
68
|
ast (2.4.0)
|
55
69
|
builder (3.2.3)
|
56
70
|
byebug (11.0.1)
|
57
71
|
concurrent-ruby (1.1.5)
|
58
|
-
crass (1.0.
|
59
|
-
erubi (1.
|
72
|
+
crass (1.0.5)
|
73
|
+
erubi (1.9.0)
|
60
74
|
globalid (0.4.2)
|
61
75
|
activesupport (>= 4.2.0)
|
62
|
-
i18n (1.
|
76
|
+
i18n (1.7.0)
|
63
77
|
concurrent-ruby (~> 1.0)
|
64
|
-
jaro_winkler (1.5.
|
65
|
-
loofah (2.
|
78
|
+
jaro_winkler (1.5.4)
|
79
|
+
loofah (2.3.1)
|
66
80
|
crass (~> 1.0.2)
|
67
81
|
nokogiri (>= 1.5.9)
|
68
82
|
mail (2.7.1)
|
@@ -71,46 +85,48 @@ GEM
|
|
71
85
|
mimemagic (~> 0.3.2)
|
72
86
|
method_source (0.9.2)
|
73
87
|
mimemagic (0.3.3)
|
74
|
-
mini_mime (1.0.
|
88
|
+
mini_mime (1.0.2)
|
75
89
|
mini_portile2 (2.4.0)
|
76
|
-
minitest (5.
|
77
|
-
nio4r (2.
|
78
|
-
nokogiri (1.10.
|
90
|
+
minitest (5.13.0)
|
91
|
+
nio4r (2.5.2)
|
92
|
+
nokogiri (1.10.8)
|
79
93
|
mini_portile2 (~> 2.4.0)
|
80
|
-
parallel (1.
|
81
|
-
parser (2.6.
|
94
|
+
parallel (1.18.0)
|
95
|
+
parser (2.6.5.0)
|
82
96
|
ast (~> 2.4.0)
|
83
|
-
rack (2.0.
|
97
|
+
rack (2.0.8)
|
84
98
|
rack-proxy (0.6.5)
|
85
99
|
rack
|
86
100
|
rack-test (1.1.0)
|
87
101
|
rack (>= 1.0, < 3)
|
88
|
-
rails (
|
89
|
-
actioncable (=
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
102
|
+
rails (6.0.1)
|
103
|
+
actioncable (= 6.0.1)
|
104
|
+
actionmailbox (= 6.0.1)
|
105
|
+
actionmailer (= 6.0.1)
|
106
|
+
actionpack (= 6.0.1)
|
107
|
+
actiontext (= 6.0.1)
|
108
|
+
actionview (= 6.0.1)
|
109
|
+
activejob (= 6.0.1)
|
110
|
+
activemodel (= 6.0.1)
|
111
|
+
activerecord (= 6.0.1)
|
112
|
+
activestorage (= 6.0.1)
|
113
|
+
activesupport (= 6.0.1)
|
98
114
|
bundler (>= 1.3.0)
|
99
|
-
railties (=
|
115
|
+
railties (= 6.0.1)
|
100
116
|
sprockets-rails (>= 2.0.0)
|
101
117
|
rails-dom-testing (2.0.3)
|
102
118
|
activesupport (>= 4.2.0)
|
103
119
|
nokogiri (>= 1.6)
|
104
|
-
rails-html-sanitizer (1.0
|
105
|
-
loofah (~> 2.
|
106
|
-
railties (
|
107
|
-
actionpack (=
|
108
|
-
activesupport (=
|
120
|
+
rails-html-sanitizer (1.3.0)
|
121
|
+
loofah (~> 2.3)
|
122
|
+
railties (6.0.1)
|
123
|
+
actionpack (= 6.0.1)
|
124
|
+
activesupport (= 6.0.1)
|
109
125
|
method_source
|
110
126
|
rake (>= 0.8.7)
|
111
|
-
thor (>= 0.
|
127
|
+
thor (>= 0.20.3, < 2.0)
|
112
128
|
rainbow (3.0.0)
|
113
|
-
rake (
|
129
|
+
rake (13.0.0)
|
114
130
|
rubocop (0.68.1)
|
115
131
|
jaro_winkler (~> 1.5.1)
|
116
132
|
parallel (~> 1.10)
|
@@ -118,8 +134,11 @@ GEM
|
|
118
134
|
rainbow (>= 2.2.2, < 4.0)
|
119
135
|
ruby-progressbar (~> 1.7)
|
120
136
|
unicode-display_width (>= 1.4.0, < 1.6)
|
137
|
+
rubocop-performance (1.3.0)
|
138
|
+
rubocop (>= 0.68.0)
|
121
139
|
ruby-progressbar (1.10.1)
|
122
|
-
|
140
|
+
semantic_range (2.3.0)
|
141
|
+
sprockets (4.0.0)
|
123
142
|
concurrent-ruby (~> 1.0)
|
124
143
|
rack (> 1, < 3)
|
125
144
|
sprockets-rails (3.2.1)
|
@@ -131,9 +150,10 @@ GEM
|
|
131
150
|
tzinfo (1.2.5)
|
132
151
|
thread_safe (~> 0.1)
|
133
152
|
unicode-display_width (1.5.0)
|
134
|
-
websocket-driver (0.7.
|
153
|
+
websocket-driver (0.7.1)
|
135
154
|
websocket-extensions (>= 0.1.0)
|
136
|
-
websocket-extensions (0.1.
|
155
|
+
websocket-extensions (0.1.4)
|
156
|
+
zeitwerk (2.2.1)
|
137
157
|
|
138
158
|
PLATFORMS
|
139
159
|
ruby
|
@@ -146,6 +166,8 @@ DEPENDENCIES
|
|
146
166
|
rails
|
147
167
|
rake (>= 11.1)
|
148
168
|
rubocop (< 0.69)
|
169
|
+
rubocop-performance
|
170
|
+
semantic_range
|
149
171
|
webpacker!
|
150
172
|
|
151
173
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Webpacker
|
2
2
|
|
3
3
|
[](https://travis-ci.org/rails/webpacker)
|
4
|
-
[](https://
|
4
|
+
[](https://www.npmjs.com/package/@rails/webpacker)
|
5
|
+
[](https://rubygems.org/gems/webpacker)
|
6
6
|
|
7
7
|
Webpacker makes it easy to use the JavaScript pre-processor and bundler
|
8
8
|
[webpack 4.x.x+](https://webpack.js.org/)
|
@@ -29,13 +29,14 @@ in which case you may not even need the asset pipeline. This is mostly relevant
|
|
29
29
|
- [Upgrading](#upgrading)
|
30
30
|
- [Yarn Integrity](#yarn-integrity)
|
31
31
|
- [Integrations](#integrations)
|
32
|
-
- [React](#react)
|
33
|
-
- [Angular with TypeScript](#angular-with-typescript)
|
34
|
-
- [Vue](#vue)
|
35
|
-
- [Elm](#elm)
|
36
|
-
- [Stimulus](#stimulus)
|
37
|
-
- [
|
38
|
-
- [
|
32
|
+
- [React](./docs/integrations.md#react)
|
33
|
+
- [Angular with TypeScript](./docs/integrations.md#angular-with-typescript)
|
34
|
+
- [Vue](./docs/integrations.md#vue)
|
35
|
+
- [Elm](./docs/integrations.md#elm)
|
36
|
+
- [Stimulus](./docs/integrations.md#stimulus)
|
37
|
+
- [Svelte](./docs/integrations.md#svelte)
|
38
|
+
- [CoffeeScript](./docs/integrations.md#coffeescript)
|
39
|
+
- [Erb](./docs/integrations.md#erb)
|
39
40
|
- [Paths](#paths)
|
40
41
|
- [Resolved](#resolved)
|
41
42
|
- [Watched](#watched)
|
@@ -49,9 +50,9 @@ in which case you may not even need the asset pipeline. This is mostly relevant
|
|
49
50
|
|
50
51
|
## Prerequisites
|
51
52
|
|
52
|
-
* Ruby 2.
|
53
|
-
* Rails
|
54
|
-
* Node.js
|
53
|
+
* Ruby 2.4+
|
54
|
+
* Rails 5.2+
|
55
|
+
* Node.js 10.13.0+
|
55
56
|
* Yarn 1.x+
|
56
57
|
|
57
58
|
|
@@ -89,6 +90,7 @@ gem 'webpacker', '~> 4.x'
|
|
89
90
|
# OR if you prefer to use master
|
90
91
|
gem 'webpacker', git: 'https://github.com/rails/webpacker.git'
|
91
92
|
yarn add https://github.com/rails/webpacker.git
|
93
|
+
yarn add core-js regenerator-runtime
|
92
94
|
```
|
93
95
|
|
94
96
|
Finally, run the following to install Webpacker:
|
@@ -122,6 +124,13 @@ app/javascript:
|
|
122
124
|
└── logo.svg
|
123
125
|
```
|
124
126
|
|
127
|
+
In `/packs/application.js`, include this at the top of the file:
|
128
|
+
|
129
|
+
```js
|
130
|
+
import "core-js/stable";
|
131
|
+
import "regenerator-runtime/runtime";
|
132
|
+
```
|
133
|
+
|
125
134
|
You can then link the JavaScript pack in Rails views using the `javascript_pack_tag` helper.
|
126
135
|
If you have styles imported in your pack file, you can link them by using `stylesheet_pack_tag`:
|
127
136
|
|
@@ -318,145 +327,21 @@ You may also turn on this feature by adding the config option for any Rails envi
|
|
318
327
|
|
319
328
|
## Integrations
|
320
329
|
|
321
|
-
Webpacker ships with basic out-of-the-box integration
|
322
|
-
You can see a list of available commands/tasks by running `bundle exec rails webpacker`:
|
323
|
-
|
324
|
-
### React
|
325
|
-
|
326
|
-
To use Webpacker with [React](https://facebook.github.io/react/), create a
|
327
|
-
new Rails 5.1+ app using `--webpack=react` option:
|
328
|
-
|
329
|
-
```bash
|
330
|
-
# Rails 5.1+
|
331
|
-
rails new myapp --webpack=react
|
332
|
-
```
|
333
|
-
|
334
|
-
(or run `bundle exec rails webpacker:install:react` in an existing Rails app already
|
335
|
-
setup with Webpacker).
|
336
|
-
|
337
|
-
The installer will add all relevant dependencies using Yarn, changes
|
338
|
-
to the configuration files, and an example React component to your
|
339
|
-
project in `app/javascript/packs` so that you can experiment with React right away.
|
340
|
-
|
341
|
-
|
342
|
-
### Angular with TypeScript
|
343
|
-
|
344
|
-
To use Webpacker with [Angular](https://angular.io/), create a
|
345
|
-
new Rails 5.1+ app using `--webpack=angular` option:
|
346
|
-
|
347
|
-
```bash
|
348
|
-
# Rails 5.1+
|
349
|
-
rails new myapp --webpack=angular
|
350
|
-
```
|
351
|
-
|
352
|
-
(or run `bundle exec rails webpacker:install:angular` on a Rails app already
|
353
|
-
setup with Webpacker).
|
354
|
-
|
355
|
-
The installer will add the TypeScript and Angular core libraries using Yarn alongside
|
356
|
-
a few changes to the configuration files. An example component written in
|
357
|
-
TypeScript will also be added to your project in `app/javascript` so that
|
358
|
-
you can experiment with Angular right away.
|
359
|
-
|
360
|
-
By default, Angular uses a JIT compiler for development environment. This
|
361
|
-
compiler is not compatible with restrictive CSP (Content Security
|
362
|
-
Policy) environments like Rails 5.2+. You can use Angular AOT compiler
|
363
|
-
in development with the [@ngtools/webpack](https://www.npmjs.com/package/@ngtools/webpack#usage) plugin.
|
364
|
-
|
365
|
-
Alternatively if you're using Rails 5.2+ you can enable `unsafe-eval` rule for your
|
366
|
-
development environment. This can be done in the `config/initializers/content_security_policy.rb`
|
367
|
-
with the following code:
|
368
|
-
|
369
|
-
```ruby
|
370
|
-
Rails.application.config.content_security_policy do |policy|
|
371
|
-
if Rails.env.development?
|
372
|
-
policy.script_src :self, :https, :unsafe_eval
|
373
|
-
else
|
374
|
-
policy.script_src :self, :https
|
375
|
-
end
|
376
|
-
end
|
377
|
-
```
|
378
|
-
|
379
|
-
|
380
|
-
### Vue
|
381
|
-
|
382
|
-
To use Webpacker with [Vue](https://vuejs.org/), create a
|
383
|
-
new Rails 5.1+ app using `--webpack=vue` option:
|
384
|
-
|
385
|
-
```bash
|
386
|
-
# Rails 5.1+
|
387
|
-
rails new myapp --webpack=vue
|
388
|
-
```
|
389
|
-
(or run `bundle exec rails webpacker:install:vue` on a Rails app already setup with Webpacker).
|
390
|
-
|
391
|
-
The installer will add Vue and its required libraries using Yarn alongside
|
392
|
-
automatically applying changes needed to the configuration files. An example component will
|
393
|
-
be added to your project in `app/javascript` so that you can experiment with Vue right away.
|
394
|
-
|
395
|
-
If you're using Rails 5.2+ you'll need to enable `unsafe-eval` rule for your development environment.
|
396
|
-
This can be done in the `config/initializers/content_security_policy.rb` with the following
|
397
|
-
configuration:
|
398
|
-
|
399
|
-
```ruby
|
400
|
-
Rails.application.config.content_security_policy do |policy|
|
401
|
-
if Rails.env.development?
|
402
|
-
policy.script_src :self, :https, :unsafe_eval
|
403
|
-
else
|
404
|
-
policy.script_src :self, :https
|
405
|
-
end
|
406
|
-
end
|
407
|
-
```
|
408
|
-
You can read more about this in the [Vue docs](https://vuejs.org/v2/guide/installation.html#CSP-environments).
|
409
|
-
|
410
|
-
|
411
|
-
### Elm
|
412
|
-
|
413
|
-
To use Webpacker with [Elm](http://elm-lang.org), create a
|
414
|
-
new Rails 5.1+ app using `--webpack=elm` option:
|
415
|
-
|
416
|
-
```
|
417
|
-
# Rails 5.1+
|
418
|
-
rails new myapp --webpack=elm
|
419
|
-
```
|
420
|
-
|
421
|
-
(or run `bundle exec rails webpacker:install:elm` on a Rails app already setup with Webpacker).
|
422
|
-
|
423
|
-
The Elm library and its core packages will be added via Yarn and Elm.
|
424
|
-
An example `Main.elm` app will also be added to your project in `app/javascript`
|
425
|
-
so that you can experiment with Elm right away.
|
426
|
-
|
427
|
-
### Stimulus
|
428
|
-
|
429
|
-
To use Webpacker with [Stimulus](http://stimulusjs.org), create a
|
430
|
-
new Rails 5.1+ app using `--webpack=stimulus` option:
|
431
|
-
|
432
|
-
```
|
433
|
-
# Rails 5.1+
|
434
|
-
rails new myapp --webpack=stimulus
|
435
|
-
```
|
436
|
-
|
437
|
-
(or run `bundle exec rails webpacker:install:stimulus` on a Rails app already setup with Webpacker).
|
438
|
-
|
439
|
-
Please read [The Stimulus Handbook](https://stimulusjs.org/handbook/introduction) or learn more about its source code at https://github.com/stimulusjs/stimulus
|
440
|
-
|
441
|
-
### CoffeeScript
|
442
|
-
|
443
|
-
To add [CoffeeScript](http://coffeescript.org/) support,
|
444
|
-
run `bundle exec rails webpacker:install:coffee` on a Rails app already
|
445
|
-
setup with Webpacker.
|
446
|
-
|
447
|
-
An example `hello_coffee.coffee` file will also be added to your project
|
448
|
-
in `app/javascript/packs` so that you can experiment with CoffeeScript right away.
|
449
|
-
|
450
|
-
### Erb
|
330
|
+
Webpacker ships with basic out-of-the-box integration. You can see a list of available commands/tasks by running `bundle exec rails webpacker`.
|
451
331
|
|
452
|
-
|
453
|
-
run `bundle exec rails webpacker:install:erb` on a Rails app already
|
454
|
-
setup with Webpacker.
|
332
|
+
Included install integrations:
|
455
333
|
|
456
|
-
|
457
|
-
|
458
|
-
|
334
|
+
* [React](./docs/integrations.md#React)
|
335
|
+
* [Angular with TypeScript](./docs/integrations.md#Angular-with-TypeScript)
|
336
|
+
* [Vue](./docs/integrations.md#Vue)
|
337
|
+
* [Elm](./docs/integrations.md#Elm)
|
338
|
+
* [Svelte](./docs/integrations.md#Svelte)
|
339
|
+
* [Stimulus](./docs/integrations.md#Stimulus)
|
340
|
+
* [CoffeeScript](./docs/integrations.md#CoffeeScript)
|
341
|
+
* [Typescript](./docs/integrations.md)
|
342
|
+
* [Erb](./docs/integrations.md#Erb)
|
459
343
|
|
344
|
+
See [Integrations](./docs/integrations.md) for further details.
|
460
345
|
|
461
346
|
## Paths
|
462
347
|
|
@@ -539,7 +424,25 @@ Webpacker hooks up a new `webpacker:compile` task to `assets:precompile`, which
|
|
539
424
|
|
540
425
|
## Docs
|
541
426
|
|
542
|
-
|
427
|
+
- [Development](https://github.com/rails/webpacker#development)
|
428
|
+
- [Webpack](./docs/webpack.md)
|
429
|
+
- [Webpack-dev-server](./docs/webpack-dev-server.md)
|
430
|
+
- [Environment Variables](./docs/env.md)
|
431
|
+
- [Folder Structure](./docs/folder-structure.md)
|
432
|
+
- [Assets](./docs/assets.md)
|
433
|
+
- [CSS, Sass and SCSS](./docs/css.md)
|
434
|
+
- [ES6](./docs/es6.md)
|
435
|
+
- [Props](./docs/props.md)
|
436
|
+
- [Typescript](./docs/typescript.md)
|
437
|
+
- [Yarn](./docs/yarn.md)
|
438
|
+
- [Misc](./docs/misc.md)
|
439
|
+
- [Deployment](./docs/deployment.md)
|
440
|
+
- [Docker](./docs/docker.md)
|
441
|
+
- [Using in Rails engines](./docs/engines.md)
|
442
|
+
- [Webpacker on Cloud9](./docs/cloud9.md)
|
443
|
+
- [Testing](./docs/testing.md)
|
444
|
+
- [Troubleshooting](./docs/troubleshooting.md)
|
445
|
+
- [v3 to v4 Upgrade Guide](./docs/v4-upgrade.md)
|
543
446
|
|
544
447
|
|
545
448
|
## Contributing
|