整合elementUI等第三方框架并实现按需引入
// npm install babel-plugin-component -D
module.exports = {
presets: [
'@vue/app',
],
plugins: [
[
"component",
{
"libraryName": "element-ui",
// 自定义主题 "styleLibraryName": "~src/assets/css/element-ui"
"styleLibraryName": "theme-chalk"
}
]
]
}
html-webpack-plugin在index.html中的使用方法
可使用的环境变量
只有 NODE_ENV,BASE_URL 和以 VUE_APP_开头的环境变量可以使用