Socket
Book a DemoInstallSign in
Socket

crossorigin-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crossorigin-webpack-plugin

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

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
396
26.92%
Maintainers
1
Weekly downloads
 
Created
Source

crossorigin-webpack-plugin

English | 简体中文

✨ Features

  • Zero-config, easy to use
  • Support webpack v2/3/4/5
  • 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 ~

Changelog

License

MIT

Copyright (c) 2018-present, momoko

Keywords

webpack-plugin

FAQs

Package last updated on 16 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.