Package Exports
- webpack-target-webextension
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack-target-webextension) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
webpack-target-webextension
WebExtension Target for Webpack 4. Supports code-splitting with native dynamic import.
You can use the neutrino-webextension preset directly which uses this library.
The code is based on the official web target.
Installation
yarn
yarn add -D webpack-target-webextension
npm
npm install -D webpack-target-webextension
Usage
// webpack.config.js
const path = require('path')
const WebExtensionTarget = require('')
// Optional webpack node config
const nodeConfig = {}
module.exports = {
node: nodeConfig
output: {
// set it relative to manifest.json in production
publicPath: '/assets/',
},
target: WebExtensionTarget(nodeConfig)
}