feat(vite-plugins): 更新unplugin-auto-import插件配置
This commit is contained in:
@@ -57,6 +57,7 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
|||||||
return [
|
return [
|
||||||
// https://github.com/antfu/unplugin-auto-import
|
// https://github.com/antfu/unplugin-auto-import
|
||||||
AutoImport({
|
AutoImport({
|
||||||
|
dtsMode: 'overwrite',
|
||||||
dirs: [
|
dirs: [
|
||||||
// 'src/utils',
|
// 'src/utils',
|
||||||
'src/composables',
|
'src/composables',
|
||||||
@@ -88,10 +89,11 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
|
|||||||
}),
|
}),
|
||||||
// https://github.com/antfu/unplugin-vue-components
|
// https://github.com/antfu/unplugin-vue-components
|
||||||
Components({
|
Components({
|
||||||
|
syncMode: 'default',
|
||||||
// `__`开头的
|
// `__`开头的
|
||||||
excludeNames: [/^__/],
|
excludeNames: [/^__/],
|
||||||
// allow auto load markdown components under `./src/components/`
|
// allow auto load markdown components under `./src/components/`
|
||||||
extensions: ['vue', 'md', 'tsx'],
|
extensions: ['vue', 'md'],
|
||||||
// allow auto import and register components used in markdown
|
// allow auto import and register components used in markdown
|
||||||
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||||
resolvers: [
|
resolvers: [
|
||||||
|
|||||||
Reference in New Issue
Block a user