Skip to content

Commit

Permalink
fix(ssr): resolve .cjs file extensions (vitejs#4772)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 authored and aleclarson committed Nov 8, 2021
1 parent a938964 commit e760c20
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 e760c20

Please sign in to comment.