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

Docs: Add migration (v8 to v9) instructions for WebWorkers #1467

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

## Contents

- [Neutrino v8 to v9](#neutrino-v8-to-v9)
- [Neutrino v7 to v8](#neutrino-v7-to-v8)
- [Neutrino v6 to v7](#neutrino-v6-to-v7)
- [Neutrino v5 to v6](#neutrino-v5-to-v6)
- [Neutrino v4 to v5](#neutrino-v4-to-v5)
- [Migration Guide](#migration-guide)
- [Contents](#contents)
- [Neutrino v8 to v9](#neutrino-v8-to-v9)
- [Neutrino v7 to v8](#neutrino-v7-to-v8)
- [Migrated Packages](#migrated-packages)
- [Neutrino v6 to v7](#neutrino-v6-to-v7)
- [Neutrino v5 to v6](#neutrino-v5-to-v6)
- [Neutrino v4 to v5](#neutrino-v4-to-v5)

## Neutrino v8 to v9

Expand Down Expand Up @@ -364,7 +367,34 @@ object using the [options here](https://webpack.js.org/configuration/dev-server/
`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).
loading `*.worker.js` files [#1069](https://github.com/neutrinojs/neutrino/pull/1069). In order to use the `worker-loader` your configuration should look like:

```js
// …
react({
// …
}),
(neutrino) => {
neutrino.config.output
.globalObject('this') // will prevent `window`
.end()
.module
.rule('worker')
.test(/\.worker\.js$/)
.use('worker')
.loader(require.resolve('worker-loader'))
// see https://github.com/webpack-contrib/worker-loader#options
// .options({
// inline: true,
// fallback: true,
// })
.end()
.end()
.end();
},
// …
```

- **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 Down