Skip to content

Commit e84e7f4

Browse files
committed
fix(preview): optimize brace-expansion
1 parent 80744c4 commit e84e7f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/preview/module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export async function setupPreview(options: ModuleOptions, nuxt: Nuxt, resolver:
2222
const iframeMessagingAllowedOrigins = process.env.PREVIEW_ALLOWED_ORIGINS
2323
const gitInfo = previewOptions.gitInfo || await getLocalGitInfo(nuxt.options.rootDir) || getGitEnv() || {} as GitInfo
2424

25+
nuxt.options.vite.optimizeDeps ||= {}
26+
nuxt.options.vite.optimizeDeps.include ||= []
27+
nuxt.options.vite.optimizeDeps.include.push('brace-expansion')
28+
2529
// Public runtimeConfig
2630
nuxt.options.runtimeConfig.public.preview = { api, iframeMessagingAllowedOrigins }
2731

0 commit comments

Comments
 (0)