Skip to content

Commit

Permalink
fix: prefer .js over .mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 22, 2021
1 parent e7d35f5 commit ccc180c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/ssr/ssrModuleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ async function instantiateModule(
const resolveOptions: InternalResolveOptions = {
conditions: ['node'],
dedupe,
// Prefer CommonJS modules.
extensions: ['.js', '.mjs', '.ts', '.jsx', '.tsx', '.json'],
isBuild: true,
isProduction,
// Disable "module" condition.
Expand Down

0 comments on commit ccc180c

Please sign in to comment.