If you use webpack and babel to build your Recat project, this example may be useful for you.
webpack
babel
Before:
After: