I just started getting this error in my static assets build with parcel.js. It works locally but my build on Heroku is erroring and I'm not sure if it's related.
Getting the same issue. Resolved it by installing core-js as a top level dependency and then adding it as an option to .babelrc
npm install --save core-js@3
Then updated my .babelrc file to include it as an option:
{
"presets": [
[ "@babel/preset-env", {
"useBuiltIns": "entry",
"corejs": 3
}]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
["@babel/plugin-proposal-class-properties", { "loose": false }],
"@babel/plugin-proposal-json-strings"
]
}
I referenced the docs here to figure it out https://babeljs.io/docs/en/babel-preset-env#usebuiltins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With