- Fix experimental_output stack overflow
- Fix experimental_output with HMR chunks
- Fix experimental_output stack overflow
- Now rspack can use chunk splitting by
experimental_output
.
- Add a try-catch wrapper around the entry file of serviceWorkerEntry so if the initial code throws, you can still open the console of it.
Enabled by default, set option
tryCatchWrapper
tofalse
to disable it. - Add
experimental_output
to support service worker/content scripts used withsplitChunks.chunks
oroptimization.runtimeChunk
.
- Fix ServiceWorkerPlugin does not add eager chunks correctly in watch mode.
- Fix
splitChunks: { chunks: 'all', minSize: 1 }
crashes rspack.
- Works on rspack now
- (Breaking) Minimal Node.js requirement changed from 14.17.16 to 18.20.5
- (Breaking) Deprecated option
BackgroundOptions.entry
is removed. UsepageEntry
and/orserviceWorkerEntry
instead. - (Breaking) Deprecated option
BackgroundOptions.manifest
is removed. - (Breaking) Option
noWarningDynamicEntry
has been renamed tonoDynamicEntryWarning
. - (Breaking)
background.pageEntry
cannot be the same asbackground.serviceWorkerEntry
. - Now
devServer.hot
is set toonly
by default. - Now
output.environment.dynamicImport
is set totrue
by default. - Now
output.hotUpdateChunkFilename
is set tohot/[id].[fullhash].js
by default. - Now
output.hotUpdateMainFilename
is set tohot/[runtime].[fullhash].json
by default.
- Support main world content script to be bundled. Also added a guide and example for this.
-
Add a workaround for a Chrome bug of loading content script in a sandboxed iframe.
-
Fix compatibility with mini-css-extract-plugin in Manifest v3
-
Add a warning if
background.pageEntry
andbackground.serviceWorkerEntry
are the same.The only chunk loading method
serviceWorkerEntry
supports isimportScripts
(ES Module is not supported yet) andpageEntry
only supports<script>
orimport()
.The chunk loading methods they supported have no intersection, therefore this config is impossible to work. This will be a hard error in the next version.
- Deprecate
background.entry
andbackground.manifest
in the config. - Add
background.pageEntry
andbackground.serviceWorkerEntry
in the config. Now you can build for both limited event page (used by Firefox and Safari) and background service worker (Chrome) in a single webpack build.
If you have
background.manifest = 3
,- remove
background.manifest
- change
background.entry
tobackground.serviceWorkerEntry
- remove
background.manifest = 2
(orundefined
),- remove
background.manifest
- change
background.entry
tobackground.pageEntry
- remove
Fix frameId is missing when injecting content script (#36).
Fix __webpack_require__.e
is not a function in MV3 (#33).
Add weakRuntimeCheck
option to support using with mini-css-extract-plugin
.
Fix false positive of browser
when a dom id is browser (#28).
Fix chunk loading in MV3 background worker.
We made a big write to support Manifest V3.
- Drop Webpack 4 support.
- Stay at
v0.2.1
if you cannot upgrade to webpack 5. (Webpack 4 support from0.3.0
to0.4.4
was broken). - Upgrade to Webpack 5.
- Replace
target: WebExtensionTarget({...})
withtarget: ["web", "ES2015"]
. - Node polyfills are not supported in webpack 5. Please follow the webpack 5 migration guide to shim Node libraries.
- Add
new WebExtensionTarget()
to your plugins. - Reconfigure this plugin.
- Stay at
- Drop Node 14- support.
webpack-target-webextension/lib/background
has been removed.- Remove
import 'webpack-target-webextension/lib/background'
from your project. - Configure
background
as in the README documented. - If you don't want it anymore, set
background.chunkLoaderFallback
to false.
- Remove
- If you configured your
devServer
as pre-1.0.0 document suggested, you can try to remove them.1.0.0
provides out-of-box auto configure to enable HMR.- Set
hmrConfig
to false to disable this feature.
- Set