I\'ve got a problem with my build process in relation to my React app.
I always get the following error:
Module not found: Error: Can\'t resolve \'co
If you use @babel/preset-env
and useBuiltIns
, then you just have to add corejs: 3
beside the useBuiltIns option, to specify which version to use, default is corejs: 2
.
presets: [
[
"@babel/preset-env", {
"useBuiltIns": "usage",
"corejs": 3
}
]
],
For further details see: https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpreset-env
Change all "es6" and "es7" to "es" in your polyfills.ts and polyfills.ts
The imports have changed for core-js version 3.0.1 - for example
import 'core-js/es6/array';
and
import 'core-js/es7/array';
can now be provided simply by the following
import 'core-js/es/array';
if you would prefer not to bring in the whole of core-js