Skip to content

Commit

Permalink
fix: ssrLoadModule executes code in non-strict mode, fixes #9197 (#9199)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jul 19, 2022
1 parent 3e510ab commit 5866cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async function instantiateModule(
ssrImportKey,
ssrDynamicImportKey,
ssrExportAllKey,
result.code + `\n//# sourceURL=${mod.url}`
'"use strict";' + result.code + `\n//# sourceURL=${mod.url}`
)
await initModule(
context.global,
Expand Down

0 comments on commit 5866cfb

Please sign in to comment.