@@ -24,6 +24,8 @@ import { genAppMetaInfo } from './src/utils/metadata'
24
24
import { MdiJs } from './build/mdi-js'
25
25
import { Windows } from './build/windows'
26
26
27
+ const componentsInclude = [ / \. v u e $ / , / \. v u e \? v u e / , / \. m d $ / , / \. m d \? v u e / ]
28
+
27
29
const resolve = ( file : string ) => fileURLToPath ( new URL ( file , import . meta. url ) )
28
30
29
31
const ssrTransformCustomDirective = ( ) => {
@@ -134,7 +136,7 @@ export default defineConfig(({ command, mode, isSsrBuild }) => {
134
136
// https://github.com/antfu/unplugin-vue-components
135
137
Components ( {
136
138
directoryAsNamespace : true ,
137
- include : [ / \. v u e $ / , / \. v u e \? v u e / , / \. m d $ / , / \. m d \? v u e / ] ,
139
+ include : componentsInclude ,
138
140
exclude : [ ] ,
139
141
excludeNames : [ 'AppMarkdown' ] ,
140
142
} ) ,
@@ -277,7 +279,7 @@ export default defineConfig(({ command, mode, isSsrBuild }) => {
277
279
styles : command === 'serve' || mode === 'development' ? 'sass' : true ,
278
280
} ) ,
279
281
280
- Windows ( ) ,
282
+ Windows ( componentsInclude ) ,
281
283
282
284
// https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n
283
285
VueI18n ( {
@@ -352,7 +354,7 @@ export default defineConfig(({ command, mode, isSsrBuild }) => {
352
354
Inspect ( ) ,
353
355
354
356
process . env . HTTPS === 'true' ? basicSsl ( ) : undefined ,
355
- ] ,
357
+ ] . filter ( Boolean ) ,
356
358
357
359
optimizeDeps : {
358
360
include : [
0 commit comments