script-ext-html-webpack-plugin webpack插件做监控插入

左仰岳
2023-12-01

script-ext-html-webpack-plugin的使用

在webpack.config.js中使用

const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');

new ScriptExtHtmlWebpackPlugin({

custom: {

test: /\.js$/,

attribute: 'crossorigin',

value: 'anonymous',

},

}),

output: {

path: paths.appBuild,

crossOriginLoading: 'anonymous',

},

 类似资料: