Skip to content

Commit

Permalink
Clarify nodeModules loader in CHANGELOG.md
Browse files Browse the repository at this point in the history
New `nodeModules` loader significantly change behavior.
It's specified in **Breaking changes** section but description is quite small.

As example, @javan have issue with `nodeModules` loader (rails#1892). Also, in my build it breaks `mapbox-gl` package (mapbox/mapbox-gl-js#3422).

This PR adds more details to `CHANGELOG.md` about `nodeModules` loader and receipt to keep previous behavior.
  • Loading branch information
oleksii-leonov authored Jan 16, 2019
1 parent 404751f commit 2dd2fb2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
extract_css: true
```
- Separate rule to compile node modules
(fixes cases where ES6 libraries were included in the app code) [#1823](https://github.com/rails/webpacker/pull/1823)
(fixes cases where ES6 libraries were included in the app code) [#1823](https://github.com/rails/webpacker/pull/1823).
In previous versions only application code was transpiled. Now everything in `node_modules` transpiled with Babel. In some cases it could break your build ([#1892](https://github.com/rails/webpacker/issues/1892)).

[`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.

To keep previous behavior, remove `nodeModules` loader specifying `environment.loaders.delete('nodeModules');` in your `config/webpack/environment.js` file.

- File loader extensions API [#1823](https://github.com/rails/webpacker/pull/1823)
```yml
# webpacker.yml
Expand Down

0 comments on commit 2dd2fb2

Please sign in to comment.