CDN优化

1、配置vue.config.js
configureWebpack: {
...,
externals: {
'vue': 'Vue',
'three-js': 'THREE'
}
},
2、在package.json查看自己需要引入的CDN版本,然后查找对应CDN地址:https://www.bootcss.com/
3、配置public\index.html
<% if(process.env.NODE_ENV === 'production') { %>




<% } %>

posted @ 2024-09-19 11:07  God、夜  阅读(12)  评论(0)    收藏  举报