webpacker 3.6.0 → 4.0.2
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 -0
- data/.travis.yml +12 -4
- data/CHANGELOG.md +240 -28
- data/CONTRIBUTING.md +33 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +78 -71
- data/MIT-LICENSE +1 -1
- data/README.md +75 -16
- data/docs/assets.md +7 -4
- data/docs/css.md +47 -14
- data/docs/deployment.md +11 -0
- data/docs/engines.md +155 -0
- data/docs/es6.md +5 -5
- data/docs/testing.md +1 -1
- data/docs/troubleshooting.md +4 -4
- data/docs/v4-upgrade.md +132 -0
- data/docs/webpack.md +56 -3
- data/docs/yarn.md +12 -1
- data/gemfiles/Gemfile-rails-edge +1 -1
- data/gemfiles/Gemfile-rails.4.2.x +2 -2
- data/gemfiles/Gemfile-rails.5.0.x +2 -2
- data/gemfiles/Gemfile-rails.5.1.x +2 -2
- data/gemfiles/Gemfile-rails.5.2.x +10 -0
- data/lib/install/bin/webpack +5 -1
- data/lib/install/bin/webpack-dev-server +5 -1
- data/lib/install/coffee.rb +2 -2
- data/lib/install/config/.browserslistrc +1 -0
- data/lib/install/config/babel.config.js +70 -0
- data/lib/install/config/postcss.config.js +12 -0
- data/lib/install/config/webpacker.yml +26 -0
- data/lib/install/elm.rb +2 -2
- data/lib/install/erb.rb +2 -2
- data/lib/install/examples/react/babel.config.js +83 -0
- data/lib/install/examples/stimulus/application.js +1 -6
- data/lib/install/examples/stimulus/controllers/index.js +9 -0
- data/lib/install/examples/typescript/tsconfig.json +4 -0
- data/lib/install/examples/vue/hello_vue.js +6 -4
- data/lib/install/javascript/packs/application.js +8 -0
- data/lib/install/loaders/typescript.js +8 -3
- data/lib/install/loaders/vue.js +1 -8
- data/lib/install/react.rb +6 -19
- data/lib/install/template.rb +29 -30
- data/lib/install/typescript.rb +4 -4
- data/lib/install/vue.rb +14 -5
- data/lib/tasks/installers.rake +4 -2
- data/lib/tasks/webpacker/binstubs.rake +3 -2
- data/lib/tasks/webpacker/compile.rake +10 -5
- data/lib/tasks/webpacker/install.rake +3 -2
- data/lib/tasks/webpacker/verify_install.rake +1 -4
- data/lib/tasks/webpacker/yarn_install.rake +1 -1
- data/lib/webpacker/commands.rb +0 -1
- data/lib/webpacker/compiler.rb +17 -13
- data/lib/webpacker/configuration.rb +13 -5
- data/lib/webpacker/dev_server.rb +7 -10
- data/lib/webpacker/dev_server_proxy.rb +13 -6
- data/lib/webpacker/dev_server_runner.rb +13 -6
- data/lib/webpacker/helper.rb +78 -20
- data/lib/webpacker/manifest.rb +64 -21
- data/lib/webpacker/railtie.rb +16 -7
- data/lib/webpacker/runner.rb +3 -3
- data/lib/webpacker/version.rb +1 -1
- data/lib/webpacker/webpack_runner.rb +14 -3
- data/package.json +46 -34
- data/package/__tests__/config.js +37 -3
- data/package/__tests__/dev_server.js +15 -0
- data/package/__tests__/production.js +2 -2
- data/package/__tests__/staging.js +3 -3
- data/package/__tests__/test.js +2 -1
- data/package/config.js +21 -9
- data/package/config_types/config_list.js +5 -6
- data/package/dev_server.js +3 -1
- data/package/environments/__tests__/base.js +7 -5
- data/package/environments/base.js +84 -31
- data/package/environments/development.js +6 -2
- data/package/environments/production.js +46 -36
- data/package/rules/babel.js +10 -4
- data/package/rules/file.js +8 -3
- data/package/rules/index.js +7 -2
- data/package/rules/node_modules.js +23 -0
- data/package/utils/__tests__/get_style_rule.js +20 -0
- data/package/utils/deep_merge.js +5 -6
- data/package/utils/get_style_rule.js +29 -42
- data/package/utils/helpers.js +18 -6
- data/package/utils/objectify.js +1 -2
- data/test/compiler_test.rb +15 -3
- data/test/configuration_test.rb +9 -0
- data/test/dev_server_runner_test.rb +51 -0
- data/test/helper_test.rb +48 -5
- data/test/manifest_test.rb +14 -0
- data/test/rake_tasks_test.rb +34 -0
- data/test/test_app/config.ru +5 -0
- data/test/test_app/config/application.rb +1 -0
- data/test/test_app/config/webpack/development.js +0 -0
- data/test/test_app/config/webpacker.yml +20 -0
- data/test/test_app/config/webpacker_public_root.yml +19 -0
- data/test/test_app/package.json +13 -0
- data/test/test_app/public/packs/manifest.json +22 -1
- data/test/test_app/yarn.lock +11 -0
- data/test/test_helper.rb +1 -3
- data/test/webpack_runner_test.rb +51 -0
- data/yarn.lock +4077 -2816
- metadata +28 -6
- data/lib/install/config/.babelrc +0 -18
- data/lib/install/config/.postcssrc.yml +0 -3
- data/lib/install/examples/react/.babelrc +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1667789e4776c2fbb15b9093b65bc99d5b0734677382ca46a8a24135654d1f1
|
|
4
|
+
data.tar.gz: 1985a2543ac40f68feecfb972b908913f6337c9ce73414227eaf8c5bec9529cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d21492d39f14322937c10248472fca38f4fa9b04229475c05610f18fa3895c6f633c22045c320a7c35479d445e08759c8bce42b8f43984a9de586d15bb845971
|
|
7
|
+
data.tar.gz: 9d2fd59577c3a292b9ccc5720253acc75db824f6e700b0048bbeebece83aa91001680e7d7e111647f9339188cb40f42117867817cecc0928edd9443a3f3ba513
|
data/.node-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6.14.4
|
data/.travis.yml
CHANGED
|
@@ -3,14 +3,16 @@ language: ruby
|
|
|
3
3
|
before_install:
|
|
4
4
|
- gem update --system
|
|
5
5
|
rvm:
|
|
6
|
-
- 2.3.
|
|
7
|
-
- 2.4.
|
|
8
|
-
- 2.5.
|
|
6
|
+
- 2.3.8
|
|
7
|
+
- 2.4.5
|
|
8
|
+
- 2.5.3
|
|
9
|
+
- 2.6.0
|
|
9
10
|
- ruby-head
|
|
10
11
|
gemfile:
|
|
11
12
|
- gemfiles/Gemfile-rails.4.2.x
|
|
12
13
|
- gemfiles/Gemfile-rails.5.0.x
|
|
13
14
|
- gemfiles/Gemfile-rails.5.1.x
|
|
15
|
+
- gemfiles/Gemfile-rails.5.2.x
|
|
14
16
|
- gemfiles/Gemfile-rails-edge
|
|
15
17
|
cache:
|
|
16
18
|
bundler: true
|
|
@@ -33,5 +35,11 @@ matrix:
|
|
|
33
35
|
allow_failures:
|
|
34
36
|
- gemfile: gemfiles/Gemfile-rails-edge
|
|
35
37
|
exclude:
|
|
36
|
-
- rvm: 2.3.
|
|
38
|
+
- rvm: 2.3.8
|
|
37
39
|
gemfile: gemfiles/Gemfile-rails-edge
|
|
40
|
+
- rvm: 2.4.5
|
|
41
|
+
gemfile: gemfiles/Gemfile-rails-edge
|
|
42
|
+
- rvm: 2.5.3
|
|
43
|
+
gemfile: gemfiles/Gemfile-rails-edge
|
|
44
|
+
- rvm: ruby-head
|
|
45
|
+
gemfile: gemfiles/Gemfile-rails.4.2.x
|
data/CHANGELOG.md
CHANGED
|
@@ -1,56 +1,268 @@
|
|
|
1
1
|
**Please note that Webpacker 3.1.0 and 3.1.1 have some serious bugs so please consider using either 3.0.2 or 3.2.0**
|
|
2
2
|
|
|
3
|
-
## [
|
|
4
|
-
See changes: https://github.com/rails/webpacker/compare/88a253ed42966eb2d5c997435e9396881513bce1...3-x-stable
|
|
3
|
+
## [4.0.2] - 2019-03-06
|
|
5
4
|
|
|
5
|
+
- Bump the version on npm
|
|
6
6
|
|
|
7
|
-
## [
|
|
8
|
-
|
|
7
|
+
## [4.0.1] - 2019-03-04
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Pre-release version installer
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.0.0] - 2019-03-04
|
|
15
|
+
|
|
16
|
+
No changes in this release. See RC releases for changes.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [4.0.0.rc.8] - 2019-03-03
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Re-enable source maps in production to make debugging in production
|
|
24
|
+
easier. Enabling source maps doesn't have drawbacks for most of the
|
|
25
|
+
applications since maps are compressed by default and aren't loaded
|
|
26
|
+
by browsers unless Dev Tools are opened.
|
|
27
|
+
|
|
28
|
+
Source maps can be disabled in any environment configuration, e.g:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
// config/webpack/production.js
|
|
32
|
+
|
|
33
|
+
const environment = require('./environment')
|
|
34
|
+
environment.config.merge({ devtool: 'none' })
|
|
35
|
+
|
|
36
|
+
module.exports = environment.toWebpackConfig()
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- Reintroduced `context` to the file loader. Reverting the simpler paths change
|
|
40
|
+
|
|
41
|
+
- Updated file loader to have filename based on the path. This change
|
|
42
|
+
keeps the old behaviour intact i.e. let people use namespaces for media
|
|
43
|
+
inside `app/javascript` and also include media outside of `app/javascript`
|
|
44
|
+
with simpler paths, for example from `node_modules` or `app/assets`
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Files inside app/javascript (i.e. packs source path)
|
|
48
|
+
# media/[full_path_relative_to_app_javascript]/name_of_the_asset_with_digest
|
|
49
|
+
media/images/google-97e897b3851e415bec4fd30c265eb3ce.jpg
|
|
50
|
+
media/images/rails-45b116b1f66cc5e6f9724e8f9a2db73d.png
|
|
51
|
+
media/images/some_namespace/google-97e897b3851e415bec4fd30c265eb3ce.jpg
|
|
52
|
+
|
|
53
|
+
# Files outside app/javascript (i.e. packs source path)
|
|
54
|
+
# media/[containing_folder_name]/name_of_the_asset_with_digest
|
|
55
|
+
media/some_assets/rails_assets-f0f7bbb5.png
|
|
56
|
+
media/webfonts/fa-brands-400-4b115e11.woff2
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This change is done so we don't end up paths like `media/_/assets/images/rails_assets-f0f7bbb5ef00110a0dcef7c2cb7d34a6.png` or `media/_/_/node_modules/foo-f0f7bbb5ef00110a0dcef7c2cb7d34a6.png` for media outside of
|
|
60
|
+
`app/javascript`
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [4.0.0.rc.7] - 2019-01-25
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- Webpacker builds test app assets [#1908](https://github.com/rails/webpacker/issues/1908)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [4.0.0.rc.6] - 2019-01-25
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Remove `context` from file loader in favour of simpler paths
|
|
75
|
+
|
|
76
|
+
```rb
|
|
77
|
+
# before
|
|
78
|
+
"_/assets/images/avatar.png": "/packs/_/assets/images/avatar-057862c747f0fdbeae506bdd0516cad1.png"
|
|
79
|
+
|
|
80
|
+
# after
|
|
81
|
+
"media/avatar.png": "/packs/media/avatar-057862c747f0fdbeae506bdd0516cad1.png"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
To get old behaviour:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
// config/webpack/environment.js
|
|
88
|
+
|
|
89
|
+
const { environment, config } = require('@rails/webpacker')
|
|
90
|
+
const { join } = require('path')
|
|
91
|
+
|
|
92
|
+
const fileLoader = environment.loaders.get('file')
|
|
93
|
+
fileLoader.use[0].options.name = '[path][name]-[hash].[ext]'
|
|
94
|
+
fileLoader.use[0].options.context = join(config.source_path) // optional if you don't want to expose full paths
|
|
95
|
+
```
|
|
9
96
|
|
|
10
97
|
### Added
|
|
11
|
-
- On CI, sort files & check modified w/ digest intead of mtime[#1522](https://github.com/rails/webpacker/pull/1522)
|
|
12
98
|
|
|
99
|
+
- Namespaces for compiled packs in the public directory
|
|
100
|
+
|
|
101
|
+
```rb
|
|
102
|
+
# before
|
|
103
|
+
"runtime~hello_react" => "/packs/runtime~hello_react-da2baf7fd07b0e8b6d17.js"
|
|
104
|
+
|
|
105
|
+
# after
|
|
106
|
+
"runtime~hello_react" => "/packs/js/runtime~hello_react-da2baf7fd07b0e8b6d17.js"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## [4.0.0.rc.5] - 2019-01-21
|
|
110
|
+
|
|
111
|
+
### Updated
|
|
112
|
+
|
|
113
|
+
- Gems and node dependencies
|
|
13
114
|
|
|
14
|
-
|
|
115
|
+
|
|
116
|
+
## [4.0.0.rc.4] - 2019-01-21
|
|
117
|
+
|
|
118
|
+
### Added
|
|
119
|
+
- `stylesheet_packs_with_chunks_tag` helper, similar to javascript helper but for
|
|
120
|
+
loading stylesheets chunks.
|
|
121
|
+
|
|
122
|
+
```erb
|
|
123
|
+
<%= stylesheet_packs_with_chunks_tag 'calendar', 'map', 'data-turbolinks-track': 'reload' %>
|
|
124
|
+
|
|
125
|
+
<link rel="stylesheet" media="screen" href="/packs/3-8c7ce31a.chunk.css" />
|
|
126
|
+
<link rel="stylesheet" media="screen" href="/packs/calendar-8c7ce31a.chunk.css" />
|
|
127
|
+
<link rel="stylesheet" media="screen" href="/packs/map-8c7ce31a.chunk.css" />
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Important:** Pass all your pack names when using `stylesheet_packs_with_chunks_tag`
|
|
131
|
+
helper otherwise you will get duplicated chunks on the page.
|
|
132
|
+
|
|
133
|
+
```erb
|
|
134
|
+
<%# DO %>
|
|
135
|
+
# <%= stylesheet_packs_with_chunks_tag 'calendar', 'map' %>
|
|
136
|
+
<%# DON'T %>
|
|
137
|
+
# <%= stylesheet_packs_with_chunks_tag 'calendar' %>
|
|
138
|
+
# <%= stylesheet_packs_with_chunks_tag 'map' %>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## [4.0.0.rc.3] - 2019-01-17
|
|
15
143
|
|
|
16
144
|
### Fixed
|
|
17
|
-
|
|
145
|
+
- Issue with javascript_pack_tag asset duplication [#1898](https://github.com/rails/webpacker/pull/1898)
|
|
18
146
|
|
|
19
147
|
|
|
20
|
-
|
|
148
|
+
### Added
|
|
149
|
+
- `javascript_packs_with_chunks_tag` helper, which creates html tags
|
|
150
|
+
for a pack and all the dependent chunks, when using splitchunks.
|
|
21
151
|
|
|
22
|
-
|
|
152
|
+
```erb
|
|
153
|
+
<%= javascript_packs_with_chunks_tag 'calendar', 'map', 'data-turbolinks-track': 'reload' %>
|
|
23
154
|
|
|
155
|
+
<script src="/packs/vendor-16838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
|
156
|
+
<script src="/packs/calendar~runtime-16838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
|
157
|
+
<script src="/packs/calendar-1016838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
|
158
|
+
<script src="/packs/map~runtime-16838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
|
159
|
+
<script src="/packs/map-16838bab065ae1e314.js" data-turbolinks-track="reload"></script>
|
|
160
|
+
```
|
|
24
161
|
|
|
25
|
-
|
|
162
|
+
**Important:** Pass all your pack names when using `javascript_packs_with_chunks_tag`
|
|
163
|
+
helper otherwise you will get duplicated chunks on the page.
|
|
26
164
|
|
|
27
|
-
|
|
165
|
+
```erb
|
|
166
|
+
<%# DO %>
|
|
167
|
+
<%= javascript_packs_with_chunks_tag 'calendar', 'map' %>
|
|
28
168
|
|
|
169
|
+
<%# DON'T %>
|
|
170
|
+
<%= javascript_packs_with_chunks_tag 'calendar' %>
|
|
171
|
+
<%= javascript_packs_with_chunks_tag 'map' %>
|
|
172
|
+
```
|
|
29
173
|
|
|
30
|
-
## [
|
|
174
|
+
## [4.0.0.rc.2] - 2018-12-15
|
|
31
175
|
|
|
32
176
|
### Fixed
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
177
|
+
- Disable integrity hash generation [#1835](https://github.com/rails/webpacker/issues/1835)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## [4.0.0.rc.1] - 2018-12-14
|
|
181
|
+
|
|
182
|
+
### Breaking changes
|
|
183
|
+
|
|
184
|
+
- Order of rules changed so you might have to change append to prepend,
|
|
185
|
+
depending on how you want to process packs [#1823](https://github.com/rails/webpacker/pull/1823)
|
|
186
|
+
```js
|
|
187
|
+
environment.loaders.prepend()
|
|
188
|
+
```
|
|
189
|
+
- Separate CSS extraction from build environment [#1625](https://github.com/rails/webpacker/pull/1625)
|
|
190
|
+
```yml
|
|
191
|
+
# Extract and emit a css file
|
|
192
|
+
extract_css: true
|
|
193
|
+
```
|
|
194
|
+
- Separate rule to compile node modules
|
|
195
|
+
(fixes cases where ES6 libraries were included in the app code) [#1823](https://github.com/rails/webpacker/pull/1823).
|
|
196
|
+
|
|
197
|
+
In previous versions only application code was transpiled. Now everything in `node_modules` is transpiled with Babel. In some cases it could break your build (known issue with `mapbox-gl` package being broken by Babel, https://github.com/mapbox/mapbox-gl-js/issues/3422).
|
|
198
|
+
|
|
199
|
+
[`nodeModules` loader](https://github.com/rails/webpacker/pull/1823/files#diff-456094c8451b5774db50028dfecf4aa8) ignores `config.babel.js` and uses hard-coded `'@babel/preset-env', { modules: false }` config.
|
|
200
|
+
|
|
201
|
+
To keep previous behavior, remove `nodeModules` loader specifying `environment.loaders.delete('nodeModules');` in your `config/webpack/environment.js` file.
|
|
202
|
+
|
|
203
|
+
- File loader extensions API [#1823](https://github.com/rails/webpacker/pull/1823)
|
|
204
|
+
```yml
|
|
205
|
+
# webpacker.yml
|
|
206
|
+
static_assets_extensions:
|
|
207
|
+
- .pdf
|
|
208
|
+
# etc..
|
|
209
|
+
```
|
|
36
210
|
|
|
37
211
|
### Added
|
|
38
|
-
- `image_pack_tag` helper [#1400](https://github.com/rails/webpacker/pull/1400)
|
|
39
|
-
- devserver proxy for custom environments [#1415](https://github.com/rails/webpacker/pull/1415)
|
|
40
|
-
- Rails webpacker:info task [#1416](https://github.com/rails/webpacker/pull/1416)
|
|
41
|
-
- Include `RAILS_RELATIVE_URL_ROOT` environment variable in publicPath [#1428](https://github.com/rails/webpacker/pull/1428)
|
|
42
212
|
|
|
43
|
-
|
|
213
|
+
- Move `.babelrc` and `.postcssrc` to `.js` variant [#1822](https://github.com/rails/webpacker/pull/1822)
|
|
214
|
+
- Use postcss safe parser when optimising css assets [#1822](https://github.com/rails/webpacker/pull/1822)
|
|
215
|
+
- Add split chunks api (undocumented)
|
|
216
|
+
```js
|
|
217
|
+
const { environment } = require('@rails/webpacker')
|
|
218
|
+
// Enable with default config
|
|
219
|
+
environment.splitChunks()
|
|
220
|
+
// Configure via a callback
|
|
221
|
+
environment.splitChunks((config) => Object.assign({}, config, { optimization: { splitChunks: false }}))
|
|
222
|
+
```
|
|
223
|
+
- Allow changing static file extensions using webpacker.yml (undocumented)
|
|
224
|
+
|
|
225
|
+
## [4.0.0-pre.3] - 2018-10-01
|
|
44
226
|
|
|
227
|
+
### Added
|
|
228
|
+
|
|
229
|
+
- Move supported browsers configuration to [.browserslistrc](https://github.com/browserslist/browserslist#queries)
|
|
230
|
+
|
|
231
|
+
### Breaking changes
|
|
45
232
|
|
|
46
|
-
|
|
233
|
+
- postcss-next is replaced with postcss-preset-env
|
|
234
|
+
- babel@7
|
|
47
235
|
|
|
48
236
|
### Fixed
|
|
49
|
-
|
|
237
|
+
|
|
238
|
+
- Bring back test env [#1563](https://github.com/rails/webpacker/pull/1563)
|
|
239
|
+
|
|
240
|
+
Please see a list of [commits](https://github.com/rails/webpacker/compare/2dd68f0273074aadb3f869c4c30369d5e4e3fea7...master)
|
|
241
|
+
|
|
242
|
+
## [4.0.0-pre.2] - 2018-04-2
|
|
243
|
+
|
|
244
|
+
### Fixed
|
|
245
|
+
|
|
246
|
+
- Webpack dev server version in installer
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
## [4.0.0-pre.1] - 2018-04-2
|
|
250
|
+
|
|
251
|
+
Pre-release to try out webpack 4.0 support
|
|
252
|
+
|
|
253
|
+
### Added
|
|
254
|
+
- Webpack 4.0 support [#1376](https://github.com/rails/webpacker/pull/1316)
|
|
255
|
+
|
|
256
|
+
### Fixed
|
|
257
|
+
- Remove compilation digest file if webpack command fails[#1398](https://github.com/rails/webpacker/issues/1398)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
Please refer to [3-x-stable](https://github.com/rails/webpacker/tree/3-x-stable) branch
|
|
261
|
+
for further releases and changelogs:
|
|
50
262
|
|
|
51
263
|
## [3.4.1] - 2018-03-24
|
|
52
264
|
|
|
53
|
-
|
|
265
|
+
### Fixed
|
|
54
266
|
- Yarn integrity check in development [#1374](https://github.com/rails/webpacker/issues/1374)
|
|
55
267
|
|
|
56
268
|
|
|
@@ -58,7 +270,7 @@ Complete list of changes: [#1464](https://github.com/rails/webpacker/pull/1464)
|
|
|
58
270
|
|
|
59
271
|
**Please use 3.4.1 instead**
|
|
60
272
|
|
|
61
|
-
|
|
273
|
+
### Added
|
|
62
274
|
- Support for custom Rails environments [#1359](https://github.com/rails/webpacker/pull/1359)
|
|
63
275
|
|
|
64
276
|
*This could break the compilation if you set NODE_ENV to custom environment. Now, NODE_ENV only understands production or development mode*
|
|
@@ -66,7 +278,7 @@ Complete list of changes: [#1464](https://github.com/rails/webpacker/pull/1464)
|
|
|
66
278
|
|
|
67
279
|
## [3.3.1] - 2018-03-12
|
|
68
280
|
|
|
69
|
-
|
|
281
|
+
### Fixed
|
|
70
282
|
|
|
71
283
|
- Use webpack dev server 2.x until webpacker supports webpack 4.x [#1338](https://github.com/rails/webpacker/issues/1338)
|
|
72
284
|
|
|
@@ -121,7 +333,7 @@ And, bunch of bug fixes [See changes](https://github.com/rails/webpacker/compare
|
|
|
121
333
|
|
|
122
334
|
- Fix checking 'webpack' binstub on Windows [#1123](https://github.com/rails/webpacker/pull/1123)
|
|
123
335
|
|
|
124
|
-
- silence yarn output if checking is
|
|
336
|
+
- silence yarn output if checking is successful [#1131](https://github.com/rails/webpacker/pull/1131)
|
|
125
337
|
|
|
126
338
|
- Update uglifyJs plugin to support ES6 [#1194](https://github.com/rails/webpacker/pull/1194)
|
|
127
339
|
|
|
@@ -339,7 +551,7 @@ without sprockets
|
|
|
339
551
|
- Allow dev server connect timeout (in seconds) to be configurable, default: 0.01
|
|
340
552
|
|
|
341
553
|
```rb
|
|
342
|
-
#
|
|
554
|
+
# Change to 1s
|
|
343
555
|
Webpacker.dev_server.connect_timeout = 1
|
|
344
556
|
```
|
|
345
557
|
|
|
@@ -347,7 +559,7 @@ Webpacker.dev_server.connect_timeout = 1
|
|
|
347
559
|
|
|
348
560
|
- Binstubs [#833](https://github.com/rails/webpacker/pull/833)
|
|
349
561
|
|
|
350
|
-
- Allow dev server settings to be
|
|
562
|
+
- Allow dev server settings to be overridden by env variables [#843](https://github.com/rails/webpacker/pull/843)
|
|
351
563
|
|
|
352
564
|
- A new `lookup` method to manifest to perform lookup without raise and return `nil`
|
|
353
565
|
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## Setting Up a Development Environment
|
|
2
|
+
|
|
3
|
+
1. Install [Yarn](https://yarnpkg.com/)
|
|
4
|
+
|
|
5
|
+
2. Run the following commands to set up the development environment.
|
|
6
|
+
```
|
|
7
|
+
bundle install
|
|
8
|
+
yarn
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Making sure your changes pass all tests
|
|
12
|
+
There are a number of automated checks which run on Travis CI when a pull request is created.
|
|
13
|
+
You can run those checks on your own locally to make sure that your changes would not break the CI build.
|
|
14
|
+
|
|
15
|
+
### 1. Check the code for JavaScript style violations
|
|
16
|
+
```
|
|
17
|
+
yarn lint
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Check the code for Ruby style violations
|
|
21
|
+
```
|
|
22
|
+
bundle exec rubocop
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 3. Run the JavaScript test suite
|
|
26
|
+
```
|
|
27
|
+
yarn test
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 4. Run the Ruby test suite
|
|
31
|
+
```
|
|
32
|
+
bundle exec rake test
|
|
33
|
+
```
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/rubocop-hq/rubocop.git
|
|
3
|
+
revision: dc69686abf10d9f38ed3a39037fab76ae8874138
|
|
4
|
+
specs:
|
|
5
|
+
rubocop (0.65.0)
|
|
6
|
+
jaro_winkler (~> 1.5.1)
|
|
7
|
+
parallel (~> 1.10)
|
|
8
|
+
parser (>= 2.5, != 2.5.1.1)
|
|
9
|
+
powerpack (~> 0.1)
|
|
10
|
+
psych (>= 3.1.0)
|
|
11
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
12
|
+
ruby-progressbar (~> 1.7)
|
|
13
|
+
unicode-display_width (~> 1.4.0)
|
|
14
|
+
|
|
1
15
|
PATH
|
|
2
16
|
remote: .
|
|
3
17
|
specs:
|
|
4
|
-
webpacker (
|
|
18
|
+
webpacker (4.0.2)
|
|
5
19
|
activesupport (>= 4.2)
|
|
6
20
|
rack-proxy (>= 0.6.1)
|
|
7
21
|
railties (>= 4.2)
|
|
@@ -9,43 +23,43 @@ PATH
|
|
|
9
23
|
GEM
|
|
10
24
|
remote: https://rubygems.org/
|
|
11
25
|
specs:
|
|
12
|
-
actioncable (5.2.
|
|
13
|
-
actionpack (= 5.2.
|
|
26
|
+
actioncable (5.2.2)
|
|
27
|
+
actionpack (= 5.2.2)
|
|
14
28
|
nio4r (~> 2.0)
|
|
15
29
|
websocket-driver (>= 0.6.1)
|
|
16
|
-
actionmailer (5.2.
|
|
17
|
-
actionpack (= 5.2.
|
|
18
|
-
actionview (= 5.2.
|
|
19
|
-
activejob (= 5.2.
|
|
30
|
+
actionmailer (5.2.2)
|
|
31
|
+
actionpack (= 5.2.2)
|
|
32
|
+
actionview (= 5.2.2)
|
|
33
|
+
activejob (= 5.2.2)
|
|
20
34
|
mail (~> 2.5, >= 2.5.4)
|
|
21
35
|
rails-dom-testing (~> 2.0)
|
|
22
|
-
actionpack (5.2.
|
|
23
|
-
actionview (= 5.2.
|
|
24
|
-
activesupport (= 5.2.
|
|
36
|
+
actionpack (5.2.2)
|
|
37
|
+
actionview (= 5.2.2)
|
|
38
|
+
activesupport (= 5.2.2)
|
|
25
39
|
rack (~> 2.0)
|
|
26
40
|
rack-test (>= 0.6.3)
|
|
27
41
|
rails-dom-testing (~> 2.0)
|
|
28
42
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
29
|
-
actionview (5.2.
|
|
30
|
-
activesupport (= 5.2.
|
|
43
|
+
actionview (5.2.2)
|
|
44
|
+
activesupport (= 5.2.2)
|
|
31
45
|
builder (~> 3.1)
|
|
32
46
|
erubi (~> 1.4)
|
|
33
47
|
rails-dom-testing (~> 2.0)
|
|
34
48
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
35
|
-
activejob (5.2.
|
|
36
|
-
activesupport (= 5.2.
|
|
49
|
+
activejob (5.2.2)
|
|
50
|
+
activesupport (= 5.2.2)
|
|
37
51
|
globalid (>= 0.3.6)
|
|
38
|
-
activemodel (5.2.
|
|
39
|
-
activesupport (= 5.2.
|
|
40
|
-
activerecord (5.2.
|
|
41
|
-
activemodel (= 5.2.
|
|
42
|
-
activesupport (= 5.2.
|
|
52
|
+
activemodel (5.2.2)
|
|
53
|
+
activesupport (= 5.2.2)
|
|
54
|
+
activerecord (5.2.2)
|
|
55
|
+
activemodel (= 5.2.2)
|
|
56
|
+
activesupport (= 5.2.2)
|
|
43
57
|
arel (>= 9.0)
|
|
44
|
-
activestorage (5.2.
|
|
45
|
-
actionpack (= 5.2.
|
|
46
|
-
activerecord (= 5.2.
|
|
58
|
+
activestorage (5.2.2)
|
|
59
|
+
actionpack (= 5.2.2)
|
|
60
|
+
activerecord (= 5.2.2)
|
|
47
61
|
marcel (~> 0.3.1)
|
|
48
|
-
activesupport (5.2.
|
|
62
|
+
activesupport (5.2.2)
|
|
49
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
50
64
|
i18n (>= 0.7, < 2)
|
|
51
65
|
minitest (~> 5.1)
|
|
@@ -53,74 +67,67 @@ GEM
|
|
|
53
67
|
arel (9.0.0)
|
|
54
68
|
ast (2.4.0)
|
|
55
69
|
builder (3.2.3)
|
|
56
|
-
byebug (
|
|
57
|
-
concurrent-ruby (1.
|
|
70
|
+
byebug (11.0.0)
|
|
71
|
+
concurrent-ruby (1.1.4)
|
|
58
72
|
crass (1.0.4)
|
|
59
|
-
erubi (1.
|
|
60
|
-
globalid (0.4.
|
|
73
|
+
erubi (1.8.0)
|
|
74
|
+
globalid (0.4.2)
|
|
61
75
|
activesupport (>= 4.2.0)
|
|
62
|
-
i18n (1.
|
|
76
|
+
i18n (1.5.3)
|
|
63
77
|
concurrent-ruby (~> 1.0)
|
|
64
|
-
jaro_winkler (1.5.
|
|
65
|
-
loofah (2.2.
|
|
78
|
+
jaro_winkler (1.5.2)
|
|
79
|
+
loofah (2.2.3)
|
|
66
80
|
crass (~> 1.0.2)
|
|
67
81
|
nokogiri (>= 1.5.9)
|
|
68
|
-
mail (2.7.
|
|
82
|
+
mail (2.7.1)
|
|
69
83
|
mini_mime (>= 0.1.1)
|
|
70
|
-
marcel (0.3.
|
|
84
|
+
marcel (0.3.3)
|
|
71
85
|
mimemagic (~> 0.3.2)
|
|
72
|
-
method_source (0.9.
|
|
73
|
-
mimemagic (0.3.
|
|
74
|
-
mini_mime (1.0.
|
|
75
|
-
mini_portile2 (2.
|
|
86
|
+
method_source (0.9.2)
|
|
87
|
+
mimemagic (0.3.3)
|
|
88
|
+
mini_mime (1.0.1)
|
|
89
|
+
mini_portile2 (2.4.0)
|
|
76
90
|
minitest (5.11.3)
|
|
77
91
|
nio4r (2.3.1)
|
|
78
|
-
nokogiri (1.
|
|
79
|
-
mini_portile2 (~> 2.
|
|
80
|
-
parallel (1.
|
|
81
|
-
parser (2.
|
|
92
|
+
nokogiri (1.10.1)
|
|
93
|
+
mini_portile2 (~> 2.4.0)
|
|
94
|
+
parallel (1.14.0)
|
|
95
|
+
parser (2.6.0.0)
|
|
82
96
|
ast (~> 2.4.0)
|
|
83
97
|
powerpack (0.1.2)
|
|
84
|
-
|
|
85
|
-
rack
|
|
98
|
+
psych (3.1.0)
|
|
99
|
+
rack (2.0.6)
|
|
100
|
+
rack-proxy (0.6.5)
|
|
86
101
|
rack
|
|
87
|
-
rack-test (1.
|
|
102
|
+
rack-test (1.1.0)
|
|
88
103
|
rack (>= 1.0, < 3)
|
|
89
|
-
rails (5.2.
|
|
90
|
-
actioncable (= 5.2.
|
|
91
|
-
actionmailer (= 5.2.
|
|
92
|
-
actionpack (= 5.2.
|
|
93
|
-
actionview (= 5.2.
|
|
94
|
-
activejob (= 5.2.
|
|
95
|
-
activemodel (= 5.2.
|
|
96
|
-
activerecord (= 5.2.
|
|
97
|
-
activestorage (= 5.2.
|
|
98
|
-
activesupport (= 5.2.
|
|
104
|
+
rails (5.2.2)
|
|
105
|
+
actioncable (= 5.2.2)
|
|
106
|
+
actionmailer (= 5.2.2)
|
|
107
|
+
actionpack (= 5.2.2)
|
|
108
|
+
actionview (= 5.2.2)
|
|
109
|
+
activejob (= 5.2.2)
|
|
110
|
+
activemodel (= 5.2.2)
|
|
111
|
+
activerecord (= 5.2.2)
|
|
112
|
+
activestorage (= 5.2.2)
|
|
113
|
+
activesupport (= 5.2.2)
|
|
99
114
|
bundler (>= 1.3.0)
|
|
100
|
-
railties (= 5.2.
|
|
115
|
+
railties (= 5.2.2)
|
|
101
116
|
sprockets-rails (>= 2.0.0)
|
|
102
117
|
rails-dom-testing (2.0.3)
|
|
103
118
|
activesupport (>= 4.2.0)
|
|
104
119
|
nokogiri (>= 1.6)
|
|
105
120
|
rails-html-sanitizer (1.0.4)
|
|
106
121
|
loofah (~> 2.2, >= 2.2.2)
|
|
107
|
-
railties (5.2.
|
|
108
|
-
actionpack (= 5.2.
|
|
109
|
-
activesupport (= 5.2.
|
|
122
|
+
railties (5.2.2)
|
|
123
|
+
actionpack (= 5.2.2)
|
|
124
|
+
activesupport (= 5.2.2)
|
|
110
125
|
method_source
|
|
111
126
|
rake (>= 0.8.7)
|
|
112
|
-
thor (>= 0.
|
|
127
|
+
thor (>= 0.19.0, < 2.0)
|
|
113
128
|
rainbow (3.0.0)
|
|
114
|
-
rake (12.3.
|
|
115
|
-
|
|
116
|
-
jaro_winkler (~> 1.5.1)
|
|
117
|
-
parallel (~> 1.10)
|
|
118
|
-
parser (>= 2.5)
|
|
119
|
-
powerpack (~> 0.1)
|
|
120
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
121
|
-
ruby-progressbar (~> 1.7)
|
|
122
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
123
|
-
ruby-progressbar (1.9.0)
|
|
129
|
+
rake (12.3.2)
|
|
130
|
+
ruby-progressbar (1.10.0)
|
|
124
131
|
sprockets (3.7.2)
|
|
125
132
|
concurrent-ruby (~> 1.0)
|
|
126
133
|
rack (> 1, < 3)
|
|
@@ -128,11 +135,11 @@ GEM
|
|
|
128
135
|
actionpack (>= 4.0)
|
|
129
136
|
activesupport (>= 4.0)
|
|
130
137
|
sprockets (>= 3.0.0)
|
|
131
|
-
thor (0.20.
|
|
138
|
+
thor (0.20.3)
|
|
132
139
|
thread_safe (0.3.6)
|
|
133
140
|
tzinfo (1.2.5)
|
|
134
141
|
thread_safe (~> 0.1)
|
|
135
|
-
unicode-display_width (1.4.
|
|
142
|
+
unicode-display_width (1.4.1)
|
|
136
143
|
websocket-driver (0.7.0)
|
|
137
144
|
websocket-extensions (>= 0.1.0)
|
|
138
145
|
websocket-extensions (0.1.3)
|
|
@@ -147,7 +154,7 @@ DEPENDENCIES
|
|
|
147
154
|
rack-proxy
|
|
148
155
|
rails
|
|
149
156
|
rake (>= 11.1)
|
|
150
|
-
rubocop
|
|
157
|
+
rubocop!
|
|
151
158
|
webpacker!
|
|
152
159
|
|
|
153
160
|
BUNDLED WITH
|