|
|
|
|
@ -10,7 +10,7 @@ import ElementPlus from 'unplugin-element-plus/vite'
|
|
|
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
|
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
|
import viteCompression from 'vite-plugin-compression'
|
|
|
|
|
//import viteCompression from 'vite-plugin-compression'
|
|
|
|
|
import topLevelAwait from 'vite-plugin-top-level-await'
|
|
|
|
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
|
|
|
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
|
|
|
|
@ -76,14 +76,14 @@ export function createVitePlugins(isBuild = false) {
|
|
|
|
|
symbolId: 'icon-[dir]-[name]',
|
|
|
|
|
svgoOptions: true
|
|
|
|
|
}),
|
|
|
|
|
viteCompression({
|
|
|
|
|
/* viteCompression({
|
|
|
|
|
verbose: true, // 是否在控制台输出压缩结果
|
|
|
|
|
disable: false, // 是否禁用
|
|
|
|
|
threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
|
|
|
|
|
algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
|
|
|
|
|
ext: '.gz', // 生成的压缩包后缀
|
|
|
|
|
deleteOriginFile: false //压缩后是否删除源文件
|
|
|
|
|
}),
|
|
|
|
|
}),*/
|
|
|
|
|
ViteEjsPlugin(),
|
|
|
|
|
topLevelAwait({
|
|
|
|
|
// https://juejin.cn/post/7152191742513512485
|
|
|
|
|
|