Skip to content

Commit 5c5da08

Browse files
build: use es2018 as output
node 10.18.0 has full support of es2018. Specify that 10.18.0 is the minimium supported node version
1 parent 1dc3701 commit 5c5da08

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,8 @@
112112
"typescript": {
113113
"optional": true
114114
}
115+
},
116+
"engines": {
117+
"node": ">=10.18.0"
115118
}
116119
}

rollup.config.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ const cjs = {
5454
plugins: [
5555
rollupPluginNodeResolve(),
5656
rollupPluginCommonjs(),
57-
rollupPluginTypescript({
58-
tsconfigOverride: { compilerOptions: { target: "es5" } }
59-
}),
57+
rollupPluginTypescript(),
6058
rollupPluginJSON({
6159
preferConst: true
6260
})
@@ -77,9 +75,7 @@ const esm = {
7775
plugins: [
7876
rollupPluginNodeResolve(),
7977
rollupPluginCommonjs(),
80-
rollupPluginTypescript({
81-
tsconfigOverride: { compilerOptions: { target: "es2017" } }
82-
}),
78+
rollupPluginTypescript(),
8379
rollupPluginJSON({
8480
preferConst: true
8581
})

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"resolveJsonModule": true,
1717
"sourceMap": false,
1818
"strictNullChecks": true,
19-
"target": "esnext",
19+
"target": "es2018",
2020
"outDir": "js_out"
2121
},
2222
"include": ["src/**/*.ts"]

0 commit comments

Comments
 (0)