Package Exports
- prepack-webpack-plugin
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 (prepack-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
prepack-webpack-plugin
A webpack plugin for prepack.
Usage
- Install
prepack-webpack-plugin
. - Add an instance of the plugin to the webpack plugin configuration.
Note that this plugin only works with webpack 4.x
Configuration
Name | Description | Default |
---|---|---|
test |
A regex used to match the files. | /\.js($|\?)/i |
prepack |
Prepack configuration. See Prepack documentation. |
Example
import PrepackWebpackPlugin from 'prepack-webpack-plugin';
const configuration = {};
module.exports = {
// ...
plugins: [
new PrepackWebpackPlugin(configuration)
]
};
If you are using commonjs, you must explicitly reference the
.default
property of the module, e.g.const PrepackWebpackPlugin = require('prepack-webpack-plugin').default; const configuration = {}; module.exports = { // ... plugins: [ new PrepackWebpackPlugin(configuration) ] };