angular - How to handle javascript with import statements -
i updated rc6 today got syntaxerror: unexpected token import
@angular/core/src/reflection/reflection.js
. upon inspection many other .js files in @angular/core npm package have import
statements. why compiled .js files have import
statements , how configure webpack handle them?
i'm answering close question. question didn't apply because should using @angular/core/bundles/core.umd.js
not @angular/core/src/reflection/reflection.js
esm (es6 module) file. want know answer, javascript files import statements should used in es6 environments , not in browser unless transpiled bable (credit @mario tacke)
Comments
Post a Comment