@tuia/scene-switch-inject-webpack-plugin
v1.0.2
Published
为HTML页面注入多场景切换插件的Webpack插件
Downloads
3
Readme
scene-switch-inject-webpack-plugin
为HTML页面注入多场景切换插件的Webpack插件
安装
npm i -D @tuia/scene-switch-inject-webpack-plugin
注:该插件依赖 HTML Webpack Plugin
使用
webpack.conf.js
const SceneSwitchInjectPlugin = require("@tuia/scene-switch-inject-webpack-plugin").default
module.exports = {
plugins: [new SceneSwitchInjectPlugin({ env: ["development", "test"] })]
}
env选项对应process.env.NODE_ENV,当process.env.NODE_ENV在env列表中,多场景切换插件将生效。