Merge pull request #284 from xiaopenggithub/master

前端发布优化,部分组件使用cdn资源,不打包
This commit is contained in:
奇淼(piexlmax
2020-11-24 23:21:00 -06:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
+11
View File
@@ -59,6 +59,17 @@ module.exports = {
config
.when(process.env.NODE_ENV !== 'development',
config => {
// 不打包 begin
// 1.目前已经测试通过[vue,axios,echarts]可以cdn引用,其它组件测试通过后可继续添加
// 2.此处添加不打包后,需在public/index.html head中添加相应cdn资源链接
config.set('externals', {
vue: 'Vue',
axios: 'axios',
echarts: 'echarts'
})
// 不打包 end
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')