Module not found: Can't resolve 'core-js/library/es7/object' code example
Example 1: Module not found: Error: Can't resolve 'core-js/modules/es6.object.create
solution install [email protected]
Example 2: Module not found: Error: Can't resolve 'core-js/es7/reflect'
// Change import in polyfills.ts
import 'core-js/es7/reflect';
// for
import 'core-js/es/reflect';
Example 3: Module not found: Error: Can't resolve 'core-js/modules/es6.object.create
// solution install [email protected]
// create babel.config.js
// copy this in babel config.js
// and load babel.config.js in entry point
require('@babel/register')({
extends: './.babelrc',
ignore: [/node_modules/],
extensions: ['.js', '.jsx', 'ts', '.tsx'],
});
require('core-js/es5');
require('core-js/es6');
require('core-js/library');
require('core-js/stage/0');
require('regenerator-runtime/runtime');