From 00f80ac2fe59c40a3953ed06816a36395771bfd0 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Sat, 4 Jan 2020 21:03:20 -0500 Subject: [PATCH] (fix): revert #130's breaking change of tsconfig options (#415) - not sure why this change was made in that PR as it was unrelated to the rest, but it broke some things related to Babel usage and maybe other things - e.g. babel macros were not included per #413 - and it used `tslib` instead of adding babel helper functions - add a comment of why it seems like the target is overriden to esnext - though I am not sure of the original reasoning, as it has existed since very early versions of TSDX, see #130 comments --- src/createRollupConfig.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index a1ce7d4e8..6a555a3f0 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -144,7 +144,12 @@ export async function createRollupConfig( sourceMap: true, declaration: true, jsx: 'react', - target: 'es5', + }, + }, + tsconfigOverride: { + compilerOptions: { + // TS -> esnext, then leave the rest to babel-preset-env + target: 'esnext', }, }, check: opts.transpileOnly === false,