Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using BabelJs to transpile lib to es5 #9126

Closed
xaviergxf opened this issue Jan 8, 2018 · 4 comments
Closed

Using BabelJs to transpile lib to es5 #9126

xaviergxf opened this issue Jan 8, 2018 · 4 comments

Comments

@xaviergxf
Copy link

I'm using a third party library that targets es2015 within my angular app. One of my app requirements is to run on IE 11. This third party library has some incompatible language features for IE 11:

  • Object shorthand notation.
    I saw that BabelJS could transpile this javascript into a compatible version for ie 11. Is there any way to do this using angular cli? Are there some examples?

Thanks

Versions

Angular CLI: 1.6.3
Node: 8.9.3
OS: win32 x64
Angular: 5.1.2
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cli: 1.6.3
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.4.2
webpack: 3.10.0

@clydin
Copy link
Member

clydin commented Jan 8, 2018

The CLI does not transpile third-party libraries. Two potential options are to either contact the library developer and request an ES5 version; or attempt to transpile the library directly.

As this is outside of the domain of the CLI itself, asking on a site such as StackOverflow would be a more appropriate venue.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

@clydin clydin closed this as completed Jan 8, 2018
@xaviergxf
Copy link
Author

Is there no way to custom module loading with angular cli? Custom options with webpack for example?

Thanks

@clydin
Copy link
Member

clydin commented Jan 8, 2018

You can run ng eject to generate a webpack configuration that can be used independently of the CLI. Note, however, that the CLI will no longer be used from that point.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants