Skip to content

Commit 718f07c

Browse files
eprestonfuturGH
authored andcommitted
fix: update CJS interop error message (vitejs#11842)
1 parent 8d566e6 commit 718f07c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/index.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const unsupportedCJS = ['resolvePackageEntry', 'resolvePackageData']
2828
unsupportedCJS.forEach((name) => {
2929
module.exports[name] = () => {
3030
throw new Error(
31-
`"${name}" is not supported in CJS build of Vite 3.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
31+
`"${name}" is not supported in CJS build of Vite 4.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
3232
)
3333
}
3434
})

0 commit comments

Comments
 (0)