Skip to content

Commit

Permalink
fix(ssr): resolve .cjs file extensions (#4772)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Aug 30, 2021
1 parent 689a2c8 commit 96712ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/utils.ts
Expand Up @@ -44,7 +44,7 @@ try {
isRunningWithYarnPnp = Boolean(require('pnpapi'))
} catch {}

const ssrExtensions = ['.js', '.json', '.node']
const ssrExtensions = ['.js', '.cjs', '.json', '.node']

export function resolveFrom(id: string, basedir: string, ssr = false): string {
return resolve.sync(id, {
Expand Down

0 comments on commit 96712ad

Please sign in to comment.