accounts-frontend/babel.config.js

61 lines
1.7 KiB
JavaScript
Raw Normal View History

/* eslint-env node */
// @ts-nocheck
module.exports = function (api) {
const env = api.env();
api.cache(true);
return {
presets: [
[
'@babel/preset-typescript',
{
allowDeclareFields: true,
},
],
'@babel/preset-react',
[
'@babel/preset-env',
{
ignoreBrowserslistConfig: true,
targets: {
node: true,
},
modules: 'commonjs',
},
],
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-function-bind',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
2020-07-21 23:45:28 +05:30
'@babel/plugin-transform-runtime',
[
'react-intl-auto',
{
removePrefix: 'packages.app',
messagesDir: './build/messages/',
useKey: true,
removeDefaultMessage: env === 'production',
},
],
2019-06-30 20:49:28 +05:30
],
env: {
webpack: {
plugins: ['react-hot-loader/babel'],
presets: [
[
'@babel/preset-env',
{
ignoreBrowserslistConfig: false,
modules: false,
useBuiltIns: 'usage', // or "entry"
corejs: 3,
},
],
2020-05-24 04:38:24 +05:30
],
},
2020-05-24 04:38:24 +05:30
},
};
2019-06-30 20:49:28 +05:30
};