Skip to content

Commit

Permalink
fix: ssrLoadModule executes code in non-strict mode, fix #9197
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jul 18, 2022
1 parent af6088f commit bb16c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
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 bb16c60

Please sign in to comment.