From 2a51be8c8d7d22c8c5274ebd764e1e260523f249 Mon Sep 17 00:00:00 2001 From: Venryx Date: Thu, 12 Dec 2019 14:35:11 -0800 Subject: [PATCH] * Changed Webpack to target ES2015 (as part of my shift to es2015 as the target for all my projects/libs). [the project required es6 anyway due to mobx 5, since it uses es2015 proxies, which are unable to be fully polyfilled] --- Scripts/Build/WebpackConfig.ts | 2 ++ tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/Build/WebpackConfig.ts b/Scripts/Build/WebpackConfig.ts index a491d0c..3dcffba 100644 --- a/Scripts/Build/WebpackConfig.ts +++ b/Scripts/Build/WebpackConfig.ts @@ -206,6 +206,8 @@ webpackConfig.module.rules = [ { loose: true, exclude: DEV ? ['babel-plugin-transform-async-to-generator', 'babel-plugin-transform-regenerator'] : [], + // targets: {esmodules: true}, // target es2015 + targets: { node: '6.5' }, // target es2015 }, ], '@babel/react', diff --git a/tsconfig.json b/tsconfig.json index 0534b08..b1e9f44 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,7 +46,7 @@ //"target": "ES5", //"target": "es2015", //"target": "es2017", - "target": "esnext", + "target": "esnext", // babel targets es2015 (ie. transpiles our code to it), so it's fine for TS to target es-next "lib": [ "es5", "es6",