We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a63a60 commit beeffb2Copy full SHA for beeffb2
src/features/cjs.ts
@@ -12,12 +12,12 @@ export function warnLegacyCJS(config: ResolvedConfig): void {
12
return
13
}
14
15
- const legacy = config.target.some((t) => {
+ const supportRequireESM = config.target.some((t) => {
16
const version = coerce(t.split('node')[1])
17
- return version && satisfies(version, '>=23.0.0 || >=22.12.0')
+ return version && satisfies(version, '^20.19.0 || >=22.12.0')
18
})
19
20
- if (legacy) {
+ if (supportRequireESM) {
21
config.logger.warnOnce(
22
'We recommend using the ESM format instead of CommonJS.\n' +
23
'The ESM format is compatible with modern platforms and runtimes, ' +
0 commit comments