Sign In

@darcytech/html-webpack-cross-origin-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darcytech/html-webpack-cross-origin-plugin

构建时往 script 和 link 标签注入 crossOrigin属性

npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

@darcytech/html-webpack-cross-origin-plugin

html-webpack-cross-origin-plugin 是一款扩展至 html-webpack-plugin 的插件, 作用是在构建时往生成的 script 和 link 标签注入 crossOrigin 属性。

Usage

入参:'anonymous' | 'use-credentials'

const HtmlWebpackCrossOriginPlugin = require('@darcytech/html-webpack-cross-origin-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

{
  plugins: [new HtmlWebpackPlugin(), new HtmlWebpackCrossOriginPlugin('anonymous')];
}

Keywords

webpack

FAQs

Package last updated on 20 Sep 2022

Related posts