1
Fork 0
photoview/ui/babel.config.js

31 lines
716 B
JavaScript
Raw Normal View History

module.exports = function (api) {
const isTest = api.env('test')
const isProduction = api.env('NODE_ENV') == 'production'
2021-04-13 14:16:40 +02:00
let presets = ['@babel/preset-react', '@babel/preset-typescript']
let plugins = []
if (isTest) {
presets.push('@babel/preset-env')
plugins.push('@babel/plugin-transform-runtime')
} else {
if (!isProduction) {
2021-06-04 15:24:55 +02:00
// plugins.push([
// 'i18next-extract',
// {
// locales: ['en', 'da', 'fr', 'sv', 'es', 'it', 'pl', 'de'],
// defaultValue: null,
// },
// ])
}
2021-04-13 19:57:33 +02:00
plugins.push(['styled-components', { pure: true }])
plugins.push('graphql-tag')
}
return {
presets: presets,
plugins: plugins,
}
}