Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/komomoo/crossorigin-webpack-plugin
📦 Add the crossorigin attribute to HTML scripts(CORS), support webpack v2/3/4/5 | 为 HTML 脚本添加 crossorigin 属性(跨域支持),支持 webpack v2/3/4/5,支持最新 webpack5
https://github.com/komomoo/crossorigin-webpack-plugin
crossorigin-attributes webpack webpack-plugin webpack5
Last synced: 11 days ago
JSON representation
📦 Add the crossorigin attribute to HTML scripts(CORS), support webpack v2/3/4/5 | 为 HTML 脚本添加 crossorigin 属性(跨域支持),支持 webpack v2/3/4/5,支持最新 webpack5
- Host: GitHub
- URL: https://github.com/komomoo/crossorigin-webpack-plugin
- Owner: komomoo
- License: mit
- Created: 2019-02-15T06:46:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-19T08:55:59.000Z (about 3 years ago)
- Last Synced: 2024-11-11T08:44:06.340Z (about 1 month ago)
- Topics: crossorigin-attributes, webpack, webpack-plugin, webpack5
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 19
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - crossorigin-webpack-plugin
README
# crossorigin-webpack-plugin
English | [简体中文](./README.zh-CN.md)
## ✨ Features
- Zero-config, easy to use
- Support webpack v2/3/4/5,support the latest webpack5
- 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 ⭐️Star ~
## [Changelog](./CHANGELOG.md)
## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2018-present, komo