Skip to content

Commit

Permalink
fix: update CJS interop error message (#11842)
Browse files Browse the repository at this point in the history
  • Loading branch information
epreston committed Jan 30, 2023
1 parent d2c26ef commit 356ddfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const unsupportedCJS = ['resolvePackageEntry', 'resolvePackageData']
unsupportedCJS.forEach((name) => {
module.exports[name] = () => {
throw new Error(
`"${name}" is not supported in CJS build of Vite 3.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
`"${name}" is not supported in CJS build of Vite 4.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
)
}
})

0 comments on commit 356ddfe

Please sign in to comment.