feat: 添加打包是否启动cdn替换本地库配置,默认false不启动

This commit is contained in:
xiaoxian521
2022-10-26 19:51:06 +08:00
parent 936070c9ce
commit 49cdcf216f
9 changed files with 126 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ const __APP_INFO__ = {
export default ({ command, mode }: ConfigEnv): UserConfigExport => {
const {
VITE_CDN,
VITE_PORT,
VITE_LEGACY,
VITE_PUBLIC_PATH,
@@ -59,7 +60,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
}
: null
},
plugins: getPluginsList(command, VITE_LEGACY),
plugins: getPluginsList(command, VITE_LEGACY, VITE_CDN),
optimizeDeps: {
include: ["pinia", "vue-i18n", "lodash-es", "@vueuse/core", "dayjs"],
exclude: ["@pureadmin/theme/dist/browser-utils"]