mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
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:
@@ -10,6 +10,9 @@
|
|||||||
"./dist/liquid.node.esm.js": "./dist/liquid.browser.esm.js"
|
"./dist/liquid.node.esm.js": "./dist/liquid.browser.esm.js"
|
||||||
},
|
},
|
||||||
"types": "dist/liquid.d.ts",
|
"types": "dist/liquid.d.ts",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint \"**/*.mjs\" \"**/*.ts\" .",
|
"lint": "eslint \"**/*.mjs\" \"**/*.ts\" .",
|
||||||
"check": "npm run build && npm test && npm run lint && npm run perf:diff",
|
"check": "npm run build && npm test && npm run lint && npm run perf:diff",
|
||||||
|
|||||||
+3
-3
@@ -61,8 +61,8 @@ const nodeCjs = {
|
|||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
banner
|
banner
|
||||||
}],
|
}],
|
||||||
external: ['path', 'fs'],
|
external: ['path', 'fs', 'stream'],
|
||||||
plugins: [versionInjection, typescript(tsconfig('es5'))],
|
plugins: [versionInjection, typescript(tsconfig('ES2020'))],
|
||||||
treeshake,
|
treeshake,
|
||||||
input
|
input
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ const nodeEsm = {
|
|||||||
format: 'esm',
|
format: 'esm',
|
||||||
banner
|
banner
|
||||||
}],
|
}],
|
||||||
external: ['path', 'fs'],
|
external: ['path', 'fs', 'stream'],
|
||||||
plugins: [
|
plugins: [
|
||||||
versionInjection,
|
versionInjection,
|
||||||
replace(esmRequire),
|
replace(esmRequire),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { FS } from './fs/fs'
|
|||||||
import * as fs from './fs/node'
|
import * as fs from './fs/node'
|
||||||
import { defaultOperators, Operators } from './render/operator'
|
import { defaultOperators, Operators } from './render/operator'
|
||||||
import { filters } from './filters'
|
import { filters } from './filters'
|
||||||
import { assert } from './types'
|
import { assert } from './util/assert'
|
||||||
|
|
||||||
type OutputEscape = (value: any) => string
|
type OutputEscape = (value: any) => string
|
||||||
type OutputEscapeOption = 'escape' | 'json' | OutputEscape
|
type OutputEscapeOption = 'escape' | 'json' | OutputEscape
|
||||||
|
|||||||
Reference in New Issue
Block a user