When I remove comment part in polyfills.ts for polyfills to load page in Internet Explore
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'reflect-metadata';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/**
* Required to support Web Animations `@angular/animation`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
But if we do build using angular cli. it throws error in console I did run this command in project "npm install --save classlist.js"
Module not found: Error: Can't resolve 'classlist.js' in src
@ ./src/polyfills.ts 36:0-22
@ multi ./src/polyfills.ts
Please suggest solution
remove the current package,
npm uninstall classlist.js --save
then run
npm cache verify
afterwards run
npm install classlist.js --save-exact
You're importing a polyfill that is not included by default. You have to install it as a dependency first. How to do that is in a comment on the same line that imports it:
// Run `npm install --save classlist.js`.
The same goes for the web-animations-js
polyfill if you haven't done so already.
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