I’ve migrated an application from create-react-app to Parcel (v1) which contains await/async.
I’ve got this error during the build process:
Uncaught ReferenceError: regeneratorRuntime
How to fix it? You need @babel/plugin-transform-runtime with regenerator=True
(it’s True
by default, documentation).
npm install --save-dev @babel/runtime @babel/plugin-transform-runtime
Create or update .babelrc
file.
{ "plugins": ["@babel/plugin-transform-runtime"]}
It should work now.