Skip to content

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

License

Notifications You must be signed in to change notification settings

komomoo/crossorigin-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crossorigin-webpack-plugin

English | 简体中文

✨ 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

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

Usage

Please put it after HtmlWebpackPlugin

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

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

Config

Default config: { crossorigin: 'anonymous' }

new CrossoriginWebpackPlugin({ crossorigin: 'anonymous' })

😉😘 If it is helpful to you,please encourage me with a ⭐️Star ~

License

MIT

Copyright (c) 2018-present, komo

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published