2019-12-08 02:48:30 +05:30
|
|
|
/* eslint-env node */
|
2020-06-04 22:11:27 +05:30
|
|
|
// @ts-nocheck
|
|
|
|
module.exports = function (api) {
|
2020-06-05 20:54:41 +05:30
|
|
|
const env = api.env();
|
2020-06-04 22:11:27 +05:30
|
|
|
api.cache(true);
|
|
|
|
|
|
|
|
return {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-typescript',
|
|
|
|
{
|
|
|
|
allowDeclareFields: true,
|
2020-05-27 15:37:25 +05:30
|
|
|
},
|
2020-06-04 22:11:27 +05:30
|
|
|
],
|
|
|
|
'@babel/preset-react',
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
ignoreBrowserslistConfig: true,
|
|
|
|
targets: {
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
modules: 'commonjs',
|
|
|
|
},
|
|
|
|
],
|
2020-05-27 15:37:25 +05:30
|
|
|
],
|
2020-06-04 22:11:27 +05:30
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
|
|
'@babel/plugin-proposal-function-bind',
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
2020-07-20 17:26:47 +05:30
|
|
|
'@babel/plugin-proposal-optional-chaining',
|
2020-07-21 23:45:28 +05:30
|
|
|
'@babel/plugin-transform-runtime',
|
2020-06-04 22:11:27 +05:30
|
|
|
[
|
|
|
|
'react-intl-auto',
|
|
|
|
{
|
|
|
|
removePrefix: 'packages.app',
|
|
|
|
messagesDir: './build/messages/',
|
|
|
|
useKey: true,
|
2020-06-05 20:54:41 +05:30
|
|
|
removeDefaultMessage: env === 'production',
|
2020-06-04 22:11:27 +05:30
|
|
|
},
|
|
|
|
],
|
2019-06-30 20:49:28 +05:30
|
|
|
],
|
2020-06-04 22:11:27 +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-06-04 22:11:27 +05:30
|
|
|
},
|
2020-05-24 04:38:24 +05:30
|
|
|
},
|
2020-06-04 22:11:27 +05:30
|
|
|
};
|
2019-06-30 20:49:28 +05:30
|
|
|
};
|