From 68e3623861c4c7fc3747811a47cddaaeac0f5fe3 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 16 Dec 2025 11:36:31 +1100 Subject: [PATCH] Use default babel config, set up on package.json --- babel.config.js | 72 ------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 babel.config.js diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 6380fdbab0..0000000000 --- a/babel.config.js +++ /dev/null @@ -1,72 +0,0 @@ -module.exports = function(api) { - var validEnv = ['development', 'test', 'production'] - var currentEnv = api.env() - var isDevelopmentEnv = api.env('development') - var isProductionEnv = api.env('production') - var isTestEnv = api.env('test') - - if (!validEnv.includes(currentEnv)) { - throw new Error( - 'Please specify a valid `NODE_ENV` or ' + - '`BABEL_ENV` environment variables. Valid values are "development", ' + - '"test", and "production". Instead, received: ' + - JSON.stringify(currentEnv) + - '.' - ) - } - - return { - presets: [ - isTestEnv && [ - '@babel/preset-env', - { - targets: { - node: 'current' - } - } - ], - (isProductionEnv || isDevelopmentEnv) && [ - '@babel/preset-env', - { - forceAllTransforms: true, - useBuiltIns: 'entry', - corejs: 3, - modules: false, - exclude: ['transform-typeof-symbol'] - } - ] - ].filter(Boolean), - plugins: [ - 'babel-plugin-macros', - '@babel/plugin-syntax-dynamic-import', - isTestEnv && 'babel-plugin-dynamic-import-node', - '@babel/plugin-transform-destructuring', - [ - '@babel/plugin-proposal-class-properties', - { - loose: true - } - ], - [ - '@babel/plugin-proposal-object-rest-spread', - { - useBuiltIns: true - } - ], - [ - '@babel/plugin-transform-runtime', - { - helpers: false - } - ], - [ - '@babel/plugin-transform-regenerator', - { - async: false - } - ], - ["@babel/plugin-proposal-private-property-in-object", { "loose": true }], - ["@babel/plugin-proposal-private-methods", { "loose": true }] - ].filter(Boolean) - } -}