13 lines
438 B
JavaScript
13 lines
438 B
JavaScript
module.exports = api => {
|
|
// caching the babel config
|
|
api.cache.using(() => process.env.NODE_ENV)
|
|
console.log(process.env.NODE_ENV, {
|
|
presets: ['@babel/preset-env', '@babel/preset-react'],
|
|
plugins: [api.env('development') && 'react-refresh/babel'].filter(Boolean)
|
|
})
|
|
return {
|
|
presets: ['@babel/preset-env', '@babel/preset-react'],
|
|
plugins: [api.env('development') && 'react-refresh/babel'].filter(Boolean)
|
|
}
|
|
}
|