While I was looking through the Angular2 documentation, I came across the code below in here .
SRC / polyfills.ts
import 'core-js/es6';
import 'core-js/es7/reflect';
require('zone.js/dist/zone');
if (process.env.ENV === 'production') {
} else {
Error['stackTraceLimit'] = Infinity;
require('zone.js/dist/long-stack-trace-zone');
}
In the above code, we see that there are expressions importand require.
"core-js" and "zone.js" are node modules.
My question is: why is it importused for core-js and requirefor "zone.js", is there any specific reason for this?
source
share