mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 20:53:49 +08:00
发布v2.18.6版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Plugin } from 'vite';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
import topLevelAwait from 'vite-plugin-top-level-await';
|
||||
import setupExtend from 'vite-plugin-vue-setup-extend';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
@@ -23,6 +24,18 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
||||
resolvers: [NaiveUiResolver()],
|
||||
}),
|
||||
|
||||
// 自动引入API
|
||||
AutoImport({
|
||||
imports: [
|
||||
'vue',
|
||||
'vue-router',
|
||||
{
|
||||
'@/locale/index': ['t'],
|
||||
},
|
||||
],
|
||||
dts: 'auto-imports.d.ts',
|
||||
}),
|
||||
|
||||
// 支持顶级wait
|
||||
topLevelAwait({
|
||||
// The export name of top-level await promise for each chunk module
|
||||
|
||||
Reference in New Issue
Block a user