Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Docs: Add v8 to v9 migration instructions for WebWorkers (#1487)
Browse files Browse the repository at this point in the history
Closes #1467.
  • Loading branch information
edmorley committed Nov 10, 2019
1 parent e6787bf commit 1c9b780
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,31 @@ object using the [options here](https://webpack.js.org/configuration/dev-server/
- **BREAKING CHANGE** `@neutrinojs/web` and its dependent middleware no longer support
`style.extract` being set to `true` [#1221](https://github.com/neutrinojs/neutrino/pull/1221).
Override `style.extract.enabled` instead.
- **BREAKING CHANGE** `@neutrinojs/web` and its dependent middleware no longer include `worker-loader` for automatically
loading `*.worker.js` files [#1069](https://github.com/neutrinojs/neutrino/pull/1069).
- **BREAKING CHANGE** `@neutrinojs/web`, its dependent middleware, and `@neutrinojs/library` no longer include
`worker-loader` for automatically loading `*.worker.js` files [#1069](https://github.com/neutrinojs/neutrino/pull/1069).
To add back support use a `.neutrinorc.js` configuration similar to:

```js
module.exports = {
use: [
// ...
(neutrino) => {
neutrino.config.output
.globalObject('this') // will prevent `window`
.end()
.module
.rule('worker')
.test(neutrino.regexFromExtensions(['worker.js']))
.use('worker')
.loader(require.resolve('worker-loader'))
.options({
// See: https://github.com/webpack-contrib/worker-loader#options
});
}
]
};
```

- **BREAKING CHANGE** The loading order for `config.resolve.extensions` has been rearranged to be closer in parity to
what webpack has configured by default [#1080](https://github.com/neutrinojs/neutrino/pull/1080).
- **BREAKING CHANGE** The tests directory is now additionally linted by default with `@neutrinojs/eslint` and its
Expand All @@ -392,7 +415,7 @@ check and test your project to ensure proper functionality.
// .neutrinorc.js
module.exports = {
use: [
'@neutrinojs/web',
// ...
(neutrino) => {
if (process.env.NODE_ENV === 'production') {
neutrino.config.plugin('manifest')
Expand Down

0 comments on commit 1c9b780

Please sign in to comment.