H5:dist打包有8M左右.
原因:1)项目功能繁杂;2)选择任一地址等插件的下载;
#尝试解决方法:局部引用element-日期时间选择器。
1,(.babelrc)添加
"es2015", {
"modules": false
}
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
2,index.html引入在线样式:(<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">)
结果:dist小了1M多,
<