Skip to content

Commit

Permalink
build: target es2017 / node 8 for cjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 23, 2022
1 parent 58608a2 commit 6f8fb22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ function genConfig(name) {
cacheRoot: path.resolve(__dirname, '../', 'node_modules/.rts2_cache'),
tsconfigOverride: {
compilerOptions: {
target: opts.transpile === false ? 'esnext' : 'es5'
// if targeting browser, target es5
// if targeting node, es2017 means Node 8
target: opts.transpile === false ? 'es2017' : 'es5'
},
exclude: ['test', 'test-dts']
}
Expand Down

0 comments on commit 6f8fb22

Please sign in to comment.