# prepack-webpack-plugin

> A webpack plugin for prepack.

Latest version **1.1.2** (published 2018-10-07) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install prepack-webpack-plugin
pnpm add prepack-webpack-plugin
yarn add prepack-webpack-plugin
bun add prepack-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2018-10-07 |
| First published | 2017-05-03 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >6.0.0 |
| Dependencies | 2 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1022 |
| Author | Gajus Kuizinas |
| Maintainers | gajus |
| Keywords | plugin, prepack, webpack |

## Links

- npm: https://www.npmjs.com/package/prepack-webpack-plugin
- Repository: https://github.com/gajus/prepack-webpack-plugin
- Homepage: https://github.com/gajus/prepack-webpack-plugin#readme
- Issues: https://github.com/gajus/prepack-webpack-plugin/issues
- npm.io page: https://npm.io/package/prepack-webpack-plugin

## Dependencies (2)

- [prepack](https://npm.io/package/prepack.md) ^0.2.53
- [webpack-sources](https://npm.io/package/webpack-sources.md) ^1.3.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2018-10-07
- 1.1.1 — 2018-06-07
- 1.1.0 — 2017-05-04
- 1.0.1 — 2017-05-03
- 1.0.0 — 2017-05-03

## README

# prepack-webpack-plugin

[![Travis build status](http://img.shields.io/travis/gajus/prepack-webpack-plugin/master.svg?style=flat-square)](https://travis-ci.org/gajus/prepack-webpack-plugin)
[![Coveralls](https://img.shields.io/coveralls/gajus/prepack-webpack-plugin.svg?style=flat-square)](https://github.com/gajus/prepack-webpack-plugin)
[![NPM version](http://img.shields.io/npm/v/prepack-webpack-plugin.svg?style=flat-square)](https://www.npmjs.org/package/prepack-webpack-plugin)
[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](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 4.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)
>   ]
> };
>
> ```

---
_Source: https://npm.io/package/prepack-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
