Babel preset for remax app.
yarn add babel-preset-remax --dev
configure react preset. https://babeljs.io/docs/en/babel-preset-react
configure typescript preset. https://babeljs.io/docs/en/babel-preset-typescript
configure babel proposal decorators. https://babeljs.io/docs/en/babel-plugin-proposal-decorators
configure babel proposal class properties. https://babeljs.io/docs/en/babel-plugin-proposal-class-properties
configure react preset throwIfNamespace option. https://babeljs.io/docs/en/babel-preset-react#throwifnamespace
{
presets: [
[
'remax',
{
react: {
runtime: 'classic',
},
typescript: {
allowNamespaces: true,
},
'class-properties': {
loose: true,
},
decorators: {
legacy: true,
},
'throw-if-namespace': false,
},
],
];
}