perf: target Node.js 14 for cjs bundle (main entry)

BREAKING CHANGE: main entry need Node.js>=14 to run, you can build LiquidJS by your own by using ESM entry.
This commit is contained in:
Jun Yang
2022-11-27 14:04:01 +08:00
parent 7eb621601c
commit 1f6ce7c822
3 changed files with 7 additions and 4 deletions
+3 -3
View File
@@ -61,8 +61,8 @@ const nodeCjs = {
format: 'cjs',
banner
}],
external: ['path', 'fs'],
plugins: [versionInjection, typescript(tsconfig('es5'))],
external: ['path', 'fs', 'stream'],
plugins: [versionInjection, typescript(tsconfig('ES2020'))],
treeshake,
input
}
@@ -73,7 +73,7 @@ const nodeEsm = {
format: 'esm',
banner
}],
external: ['path', 'fs'],
external: ['path', 'fs', 'stream'],
plugins: [
versionInjection,
replace(esmRequire),