Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ccc180c

Browse files
committedJul 22, 2021
fix: prefer .js over .mjs
1 parent e7d35f5 commit ccc180c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎packages/vite/src/node/ssr/ssrModuleLoader.ts

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ async function instantiateModule(
9797
const resolveOptions: InternalResolveOptions = {
9898
conditions: ['node'],
9999
dedupe,
100+
// Prefer CommonJS modules.
101+
extensions: ['.js', '.mjs', '.ts', '.jsx', '.tsx', '.json'],
100102
isBuild: true,
101103
isProduction,
102104
// Disable "module" condition.

0 commit comments

Comments
 (0)
Please sign in to comment.