electron-react-boilerplate
electron-react-boilerplate copied to clipboard
How to add babelrc
Summary
I need to add a babel plugin to my app, I created a babelrc.json in the root folder, but it seems the configurations are not taken.
I have to add a babel-loader in the webpack.config.base.ts to make it work. I am not sure this is a good idea to override the webpack config.
Here is the config I need to add:
{
test: /\.(ts|js)$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-typescript'],
plugins: [
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', { legacy: true }],
],
},
},
},
Babel isn't supported by ERB. Out of curiosity why do you need babel?
Babel is needed for anyone wishing to use React Native Reanimated, which is pretty much any any React Native project.