Skip to content

Commit

Permalink
fix(optimizer): escape entrypoints when running scanner (#11250)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Dec 8, 2022
1 parent 45b170e commit b61894e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
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 b61894e

Please sign in to comment.