# crossorigin-webpack-plugin

> 📦 Add the crossorigin attribute to HTML scripts(CORS), support webpack v2/3/4/5 | 为 HTML 脚本添加 crossorigin 属性（跨域支持），支持 webpack v2/3/4/5

Latest version **1.0.0** (published 2021-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install crossorigin-webpack-plugin
pnpm add crossorigin-webpack-plugin
yarn add crossorigin-webpack-plugin
bun add crossorigin-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.0.0 |
| Published | 2021-07-16 |
| First published | 2019-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | momoko |
| Maintainers | momoko |
| Keywords | webpack-plugin, webpack, crossorigin, html |

## Links

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

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-07-16
- 0.1.4 — 2019-07-05
- 0.1.3 — 2019-06-06
- 0.1.2 — 2019-06-06
- 0.1.1 — 2019-03-14
- 0.1.0 — 2019-03-13

## README

# crossorigin-webpack-plugin

English | [简体中文](./README.zh-CN.md)

## ✨ Features

- Zero-config, easy to use
- Support webpack v2/3/4/5
- Support html-webpack-plugin v2/3/4/5

## 🚀 QuickStart

### Install

```bash
yarn add -D crossorigin-webpack-plugin # OR npm i -D crossorigin-webpack-plugin
```

### Usage

> Please put it after `HtmlWebpackPlugin`

```js
const CrossoriginWebpackPlugin = require('crossorigin-webpack-plugin')

const webpackConfig = {
  /* ... */
  plugins: [
    new HtmlWebpackPlugin(),
    new CrossoriginWebpackPlugin(),
  ],
  /* ... */
}
```

### Config

> Default config: `{ crossorigin: 'anonymous' }`

```js
new CrossoriginWebpackPlugin({ crossorigin: 'anonymous' })
```

---

😉😘 If it is helpful to you，please encourage me with a <b>⭐️<a href="#">Star</a></b> ~

## [Changelog](./CHANGELOG.md)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2018-present, momoko

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