inject-tags-webpack-plugin
v1.0.4
Published
*向 webpack 入口文件(模版文件)添加标签*
Downloads
2
Readme
inject-tags-webpack-plugin
向 webpack 入口文件(模版文件)添加标签
Configuration
1、安装
npm install -D inject-tags-webpack-plugin
or
yarn add inject-tags-webpack-plugin --dev
2、配置
import InjectTagsWebpackPlugin from 'inject-tags-webpack-plugin'
export default {
plugins: [
new PluginTest({
position: 'begin',
tags: [
{
tag: `<script>window.onload = function (){ console.log(This is inject-tags-webpack-plugin) }</script>`,
target: 'body'
}
]
})
]
}