# @everymatrix/ng-annotate-webpack-plugin-patched

> webpack plugin that runs ng-annotate-patched on your bundles

Latest version **1.0.0** (published 2023-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @everymatrix/ng-annotate-webpack-plugin-patched
pnpm add @everymatrix/ng-annotate-webpack-plugin-patched
yarn add @everymatrix/ng-annotate-webpack-plugin-patched
bun add @everymatrix/ng-annotate-webpack-plugin-patched
```

## 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.0.0 |
| Published | 2023-02-01 |
| First published | 2023-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stefan Vlad |
| Maintainers | catalinpoclid, adrian.pripon, cristian.taloi, natalya.anisimova, marian.t, grace_zhang, adrian.neatu.em, alexandru.dragutescu, clokze, roman.sainchuk.em, retail-ci, stefan.vlad, raul.vasile, andreea3011 |
| Keywords | webpack, ng-annotate, ng-annotate-patched, angularjs |

## Links

- npm: https://www.npmjs.com/package/@everymatrix/ng-annotate-webpack-plugin-patched
- Repository: https://github.com/StefanVlad/ng-annotate-webpack-plugin-patched
- Issues: https://github.com/StefanVlad/ng-annotate-webpack-plugin-patched/issues
- npm.io page: https://npm.io/package/@everymatrix/ng-annotate-webpack-plugin-patched

## Dependencies (2)

- [webpack-core](https://npm.io/package/webpack-core.md) ^0.6.5
- [ng-annotate-patched](https://npm.io/package/ng-annotate-patched.md) ^1.14.1

## 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.0.0 (latest) — 2023-02-01

## README

ng-annotate-webpack-plugin
==========================

ng-annotate is deprecated. Consider using https://github.com/schmod/babel-plugin-angularjs-annotate instead.

---

WebPack plugin that runs [ng-annotate](https://github.com/olov/ng-annotate) on your bundles

Based on [ng-annotate-webpack-plugin](https://github.com/jeffling/ng-annotate-webpack-plugin)
Old version no longer works with webpack 4 because ngAnnotate, which this package is based on,
is no longer maintained. This fork is replacing the old ngAnnotate used in the plugin with a 
patched version of ngAnnotate which works with newer es2015 code syntax

# Usage
In webpack.config.js:
```javascript
var webpack = require('webpack');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin-patched');

module.exports = {
    /// ... rest of config
    plugins: [
        new ngAnnotatePlugin()
    ]
}
```
To modify the default plugin options or to add options for `ng-annotate`:
```javascript
var webpack = require('webpack');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin-patched');

module.exports = {
    /// ... rest of config
    plugins: [
        new ngAnnotatePlugin({
            add: true,
            // other ng-annotate options here
        })
    ]
}
```

Since version 0.4.0: for performance reasons, chunks where the name starts with `vendors~` are not
annotated. To customize this behavior, set the option `annotateChunk` to a method that returns
`true` if a chunk should be annotated:

```javascript
var webpack = require('webpack');
var ngAnnotatePlugin = require('ng-annotate-webpack-plugin-patched');

module.exports = {
    /// ... rest of config
    plugins: [
        new ngAnnotatePlugin({
            add: true,
            annotateChunk: (chunk) => !chunk.name || !chunk.name.startsWith("vendors~"),
            // other ng-annotate options here
        })
    ]
}
```

If you are looking for a loader instead of a plugin, use [ng-annotate-loader](https://github.com/huston007/ng-annotate-loader) instead

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