WangJunZzz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
16 additions and
5 deletions
-
vben28/build/vite/plugin/index.ts
-
vben28/build/vite/plugin/styleImport.ts
-
vben28/src/main.ts
-
vben28/vite.config.ts
|
|
|
@ -5,7 +5,7 @@ import legacy from '@vitejs/plugin-legacy'; |
|
|
|
import purgeIcons from 'vite-plugin-purge-icons'; |
|
|
|
import windiCSS from 'vite-plugin-windicss'; |
|
|
|
import VitePluginCertificate from 'vite-plugin-mkcert'; |
|
|
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'; |
|
|
|
//import vueSetupExtend from 'vite-plugin-vue-setup-extend';
|
|
|
|
import { configHtmlPlugin } from './html'; |
|
|
|
import { configPwaConfig } from './pwa'; |
|
|
|
import { configMockPlugin } from './mock'; |
|
|
|
@ -31,7 +31,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
|
|
|
// have to
|
|
|
|
vueJsx(), |
|
|
|
// support name
|
|
|
|
vueSetupExtend(), |
|
|
|
//vueSetupExtend(),
|
|
|
|
VitePluginCertificate({ |
|
|
|
source: 'coding', |
|
|
|
}), |
|
|
|
|
|
|
|
@ -5,9 +5,9 @@ |
|
|
|
import { createStyleImportPlugin } from 'vite-plugin-style-import'; |
|
|
|
|
|
|
|
export function configStyleImportPlugin(_isBuild: boolean) { |
|
|
|
// if (!isBuild) {
|
|
|
|
// return [];
|
|
|
|
// }
|
|
|
|
if (!_isBuild) { |
|
|
|
return []; |
|
|
|
} |
|
|
|
const styleImportPlugin = createStyleImportPlugin({ |
|
|
|
libs: [ |
|
|
|
{ |
|
|
|
|
|
|
|
@ -15,6 +15,12 @@ import { setupGlobDirectives } from '/@/directives'; |
|
|
|
import { setupI18n } from '/@/locales/setupI18n'; |
|
|
|
import { registerGlobComp } from '/@/components/registerGlobComp'; |
|
|
|
import Antd from 'ant-design-vue'; |
|
|
|
|
|
|
|
import { isDevMode } from './utils/env'; |
|
|
|
if (isDevMode()) { |
|
|
|
import('ant-design-vue/es/style'); |
|
|
|
} |
|
|
|
|
|
|
|
async function bootstrap() { |
|
|
|
const app = createApp(App); |
|
|
|
app.use(Antd); |
|
|
|
|
|
|
|
@ -109,6 +109,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
|
|
|
'@iconify/iconify', |
|
|
|
'ant-design-vue/es/locale/zh_CN', |
|
|
|
'ant-design-vue/es/locale/en_US', |
|
|
|
'ant-design-vue/es/style', |
|
|
|
'echarts/core', |
|
|
|
'echarts/charts', |
|
|
|
'echarts/components', |
|
|
|
'echarts/renderers', |
|
|
|
], |
|
|
|
}, |
|
|
|
}; |
|
|
|
|