You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing ng build on a project that is using a dependency that's compiled with es6, the output contains es6 code which makes older browsers break. See example below to understand this better.
Hi, Angular-CLI doesn't down-level 3rd party JavaScript.
Libraries that are meant to support older browser versions are meant to ship both ES2015 and ES5 code. And it will be up to the build system to determine which on to use.
This is very similar to #12975 (comment), insofar as we do not error if ES6 libraries are used when targetting ES5.
I think #12975 should be the main issue where third party libraries in ES2015 are discussed instead of having a fragmented discussion across multiple issues.
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Not sure.
Description
When doing
ng build
on a project that is using a dependency that's compiled with es6, the output contains es6 code which makes older browsers break. See example below to understand this better.🔬 Minimal Reproduction
messageformat
): https://github.com/MatissJanis/angular-cli-issue/commit/a406b57b5e3c40b8360a269c64177d32edc5ae86ng build
orng build --prod
(the file is really large, please search for
${fn}(${args.join(', ')})
to see the issue)Here's example screenshot of something that should NOT be in the build (since it makes IE11 and the like break).
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: