Skip to content

Commit

Permalink
feat: update default target to node14
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Now tsup requires node 14 or above, the build target is also changed to `node14` by default
  • Loading branch information
EGOIST committed May 25, 2022
1 parent b4fd91a commit f7c53f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,8 @@
"@swc/core": {
"optional": true
}
},
"engines": {
"node": ">=14"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const normalizeOptions = async (
...optionsOverride,
}
const options: Buildable<NormalizedOptions> = {
target: 'node12',
target: 'node14',
format: ['cjs'],
outDir: 'dist',
..._options,
Expand Down
2 changes: 1 addition & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type Options = {
/**
* Compile target
*
* default to `node12`
* default to `node14`
*/
target?: string | string[]
minify?: boolean
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'tsup'

export default defineConfig({
name: 'tsup',
target: 'node12.20.0',
target: 'node14',
dts: {
resolve: true,
// build types for `src/index.ts` only
Expand Down

0 comments on commit f7c53f7

Please sign in to comment.