Skip to content

Commit

Permalink
deps: upgrade Babel preset-env, remove now redundant plugins
Browse files Browse the repository at this point in the history
- optional-chaining and nullish-coalescing are now part of
  @babel/preset-env, so no need to explicitly install or configure
  them anymore
  - previously they were new syntax and TSDX adopted them as soon as
    they landed in TS
  - can view current compat table here:
    https://github.com/babel/babel/blob/e498bee10f0123bb208baa228ce6417542a2c3c4/packages/babel-compat-data/data/plugins.json#L24
  • Loading branch information
agilgur5 committed Aug 25, 2020
1 parent dbdaba1 commit 06933b2
Show file tree
Hide file tree
Showing 3 changed files with 716 additions and 624 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@
"@babel/core": "^7.4.4",
"@babel/helper-module-imports": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-regenerator": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-env": "^7.11.0",
"@rollup/plugin-commonjs": "^11.0.0",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^7.1.0",
Expand Down
4 changes: 0 additions & 4 deletions src/babelPluginTsdx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ export const babelPluginTsdx = babelPlugin.custom(() => ({
name: '@babel/plugin-proposal-class-properties',
loose: true,
},
// Adds syntax support for optional chaining (.?)
{ name: '@babel/plugin-proposal-optional-chaining' },
// Adds syntax support for default value using ?? operator
{ name: '@babel/plugin-proposal-nullish-coalescing-operator' },
{
name: '@babel/plugin-transform-regenerator',
async: false,
Expand Down
Loading

0 comments on commit 06933b2

Please sign in to comment.