- 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