I was wrestling with a feature that refused to run locally and refused to build. It was originally running on Helix Container but people knowing how to run it have all left - let’s forget about that for now and get it running in a demo app based on a newer (but unfortunately not the newest) create-react-app environment.
@babel/plugin-transform-typescript
The fact that the TypeScript code was two-year-old made babel most upset, for example, babel’s tolerance to namespace
has changed:
1 | allowNamespaces |
The babel version from the demo app was 7.12 and I had to enable the allowNamespaces
config as the code was using the namespace feature.
craco plugin to allow customizing .bablerc
I found this plugin: craco-use-babelrc to utilize .bablerc
and customize babel.
Create .babelrc
Content of .babelrc
:
1 | { |
See plugin options for reference.