accounts-frontend/babel.config.js

51 lines
1.2 KiB
JavaScript
Raw Normal View History

/* eslint-env node */
2019-06-30 20:49:28 +05:30
module.exports = {
2020-05-24 04:38:24 +05:30
presets: [
[
'@babel/preset-typescript',
{
allowDeclareFields: true,
},
],
'@babel/preset-react',
[
'@babel/preset-env',
{
ignoreBrowserslistConfig: true,
targets: {
node: true,
},
modules: 'commonjs',
},
],
],
2020-05-24 04:38:24 +05:30
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-function-bind',
'@babel/plugin-proposal-class-properties',
2019-06-30 20:49:28 +05:30
[
2020-05-24 04:38:24 +05:30
'@babel/plugin-transform-runtime',
{
corejs: 3,
},
2019-06-30 20:49:28 +05:30
],
2020-05-24 04:38:24 +05:30
['react-intl', { messagesDir: './build/messages/' }],
],
env: {
webpack: {
plugins: ['react-hot-loader/babel'],
presets: [
[
'@babel/preset-env',
{
ignoreBrowserslistConfig: false,
2020-05-24 04:38:24 +05:30
modules: false,
useBuiltIns: 'usage', // or "entry"
corejs: 3,
},
],
],
},
},
2019-06-30 20:49:28 +05:30
};