# patchjs-webpack-plugin

> Patch.js for webpack

Latest version **0.1.10** (published 2018-11-23) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2018-11-23 |
| First published | 2018-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 1.4.0 |
| Dependencies | 6 |
| Unpacked size | 57.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | yulongheli |
| Maintainers | yulongheli |
| Keywords | patchjs-webpack-plugin, performance, optimization, patch, patchjs |

## Links

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

## Dependencies (6)

- [co](https://npm.io/package/co.md) ^4.6.0
- [colors](https://npm.io/package/colors.md) ^0.6.2
- [urllib](https://npm.io/package/urllib.md) ^2.21.2
- [cli-table](https://npm.io/package/cli-table.md) ^0.2.0
- [patchjs-diff](https://npm.io/package/patchjs-diff.md) ^0.1.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.10 (latest) — 2018-11-23
- 0.1.10-beta — 2018-11-21
- 0.1.9 — 2018-11-20
- 0.1.8 — 2018-09-04
- 0.1.7 — 2018-09-04
- 0.1.6 — 2018-08-23
- 0.1.6-beta.1 — 2018-08-18
- 0.1.6-beta — 2018-08-16
- 0.1.5 — 2018-08-16
- 0.1.5-beta — 2018-08-10
- 0.1.4 — 2018-08-10
- 0.1.4-beta — 2018-08-08
- 0.1.3 — 2018-08-07
- 0.1.2 — 2018-08-07
- 0.1.1 — 2018-05-02
- … 1 more at https://npm.io/package/patchjs-webpack-plugin/versions

## README

# Patch.js for Webpack


## Introduction

This plug-in is used to calculate the difference between the two files at the build stage.

## Installation

```bash
npm install patchjs-webpack-plugin --save-dev
```

## How to use

```js
var path = require('path');
var PatchjsWebpackPlugin = require('patchjs-webpack-plugin');

module.exports = {
  entry: {
    example: './example.js'
  },
  output: {
    path: path.join(__dirname, 'dist'),
    filename: '[name].js'
  },
  module: {
    loaders: [
      { test: /\.css$/, loader: 'style-loader!css-loader' }
    ]
  },
  plugins: [
    new PatchjsWebpackPlugin({increment: true, path: 'http://static.domain.com/path/to/'})
  ]
};

```

## Options

**increment** `Boolean`

**default** `false`

It enables the incremental build.

<br/>

**count** `Number`

**default** `5`

how many incremental versions are build.

<br/>

**path** `String`

the URL prefix of a static file, recommended to use the production environment URL.

eg: 

URL: `http://static.domain.com/path/to/1.0.0/file.js`

path : `http://static.domain.com/path/to/`

<br/>

**timeout** `Number`

**default** `30000ms`

request timeout value.

<br/>

**validateVersion** `Boolean`

**default** `false`

check whether the current version is deployed.


## Others 

if you used optimize-css-assets-webpack-plugin，please filter diff file by assetNameRegExp.

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