feat(vite配置): 添加WotResolver组件解析器
在vite配置中引入@uni-helper/vite-plugin-uni-components/resolvers的WotResolver,用于自动解析组件
This commit is contained in:
@@ -2,6 +2,7 @@ import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
import Uni from '@uni-helper/plugin-uni'
|
||||
import Components from '@uni-helper/vite-plugin-uni-components'
|
||||
import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
|
||||
// @see https://uni-helper.js.org/vite-plugin-uni-layouts
|
||||
import UniLayouts from '@uni-helper/vite-plugin-uni-layouts'
|
||||
// @see https://github.com/uni-helper/vite-plugin-uni-manifest
|
||||
@@ -138,6 +139,7 @@ export default defineConfig(({ command, mode }) => {
|
||||
),
|
||||
syncManifestPlugin(),
|
||||
Components({
|
||||
resolvers: [WotResolver()],
|
||||
extensions: ['vue'],
|
||||
deep: true, // 是否递归扫描子目录,
|
||||
directoryAsNamespace: false, // 是否把目录名作为命名空间前缀,true 时组件名为 目录名+组件名,
|
||||
|
||||
Reference in New Issue
Block a user