diff options
author | ThibG <thib@sitedethib.com> | 2019-12-08 21:27:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-08 21:27:36 +0100 |
commit | 246addd5b33a172600342af3fb6fb5e4c80ad95e (patch) | |
tree | 98b87efd3f5f3d41d75482707924fde708c074ec /babel.config.js | |
parent | 7d59e25fbd7a0209c11cbe6aac4400bbca4de82b (diff) | |
parent | 49027ee948bc76cc89214f8f340d353763796f1d (diff) |
Merge pull request #1251 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'babel.config.js')
-rw-r--r-- | babel.config.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/babel.config.js b/babel.config.js index 3f7ff84db..9be5b547a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,36 +1,39 @@ module.exports = (api) => { const env = api.env(); + const reactOptions = { + development: false, + }; + const envOptions = { - debug: false, loose: true, modules: false, + debug: false, }; const config = { presets: [ - '@babel/react', + ['@babel/react', reactOptions], ['@babel/env', envOptions], ], plugins: [ - '@babel/syntax-dynamic-import', - ['@babel/proposal-object-rest-spread', { useBuiltIns: true }], ['@babel/proposal-decorators', { legacy: true }], '@babel/proposal-class-properties', ['react-intl', { messagesDir: './build/messages' }], 'preval', ], - overrides: [{ - test: /tesseract\.js/, - presets: [ - ['@babel/env', { ...envOptions, modules: 'commonjs' }], - ], - }], + overrides: [ + { + test: /tesseract\.js/, + presets: [ + ['@babel/env', { ...envOptions, modules: 'commonjs' }], + ], + }, + ], }; switch (env) { case 'production': - envOptions.debug = false; config.plugins.push(...[ 'lodash', [ @@ -55,11 +58,8 @@ module.exports = (api) => { ]); break; case 'development': + reactOptions.development = true; envOptions.debug = true; - config.plugins.push(...[ - '@babel/transform-react-jsx-source', - '@babel/transform-react-jsx-self', - ]); break; case 'test': envOptions.modules = 'commonjs'; |