https://github.com/dash-os/documentation-webpack-plugin
A Plugin to allow building of documentation.js docs with Webpack 2
https://github.com/dash-os/documentation-webpack-plugin
Last synced: 5 months ago
JSON representation
A Plugin to allow building of documentation.js docs with Webpack 2
- Host: GitHub
- URL: https://github.com/dash-os/documentation-webpack-plugin
- Owner: Dash-OS
- Created: 2017-08-14T22:48:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T22:49:12.000Z (almost 9 years ago)
- Last Synced: 2025-06-28T00:06:07.613Z (12 months ago)
- Size: 0 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# prepack-webpack-plugin
[](https://travis-ci.org/gajus/prepack-webpack-plugin)
[](https://github.com/gajus/prepack-webpack-plugin)
[](https://www.npmjs.org/package/prepack-webpack-plugin)
[](https://github.com/gajus/canonical)
A webpack plugin for [prepack](https://prepack.io/).
## Usage
1. Install `prepack-webpack-plugin`.
1. Add an instance of the plugin to the webpack [plugin configuration](https://webpack.js.org/configuration/plugins/).
> Note that this plugin only works with **webpack 2.x**
### Configuration
|Name|Description|Default|
|---|---|---|
|`test`|A regex used to match the files.|`/\.js($\|\?)/i`|
|`prepack`|Prepack configuration. See [Prepack documentation](https://prepack.io/getting-started.html#options).|
## Example
```js
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.
>
> ```js
> const PrepackWebpackPlugin = require('prepack-webpack-plugin').default;
>
> const configuration = {};
>
> module.exports = {
> // ...
> plugins: [
> new PrepackWebpackPlugin(configuration)
> ]
> };
>
> ```