Skip to content

Commit

Permalink
fix(optimizer): escape entrypoints when running scanner (vitejs#11250)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored and futurGH committed Feb 26, 2023
1 parent e0a2b50 commit 3206374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/optimizer/scan.ts
Expand Up @@ -110,7 +110,7 @@ export async function scanImports(config: ResolvedConfig): Promise<{
absWorkingDir: process.cwd(),
write: false,
stdin: {
contents: entries.map((e) => `import '${e}'`).join('\n'),
contents: entries.map((e) => `import ${JSON.stringify(e)}`).join('\n'),
loader: 'js',
},
bundle: true,
Expand Down

0 comments on commit 3206374

Please sign in to comment.