@darcytech/html-webpack-cross-origin-plugin
v1.0.5
Published
构建时往 script 和 link 标签注入 crossOrigin属性
Downloads
18
Readme
@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')];
}