JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18935
  • Score
    100M100P100Q137021F
  • License MIT

WebExtension Target for Webpack 4. Supports code-splitting with native dynamic import.

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

npm-version

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)
}