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

Support "target": "es6" in tsconfig.json #6370

Closed
hotforfeature opened this issue May 18, 2017 · 9 comments
Closed

Support "target": "es6" in tsconfig.json #6370

hotforfeature opened this issue May 18, 2017 · 9 comments
Labels
effort2: medium (days) P5 The team acknowledges the request but does not plan to address it, it remains open for discussion severity2: inconvenient

Comments

@hotforfeature
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Versions.

@angular/cli: 1.0.3
node: 6.9.5
os: darwin x64

Repro steps.

Change tsconfig.json "target" to "ES6" and run ng build --prod. UglifyJS will cause an error and the build will fail.

The log given by the failure.

ERROR in main.87940961b85a05fb6d79.bundle.js from UglifyJs
Unexpected token: name (CoreModule) [main.87940961b85a05fb6d79.bundle.js:29,6]

Desired functionality.

Either the CLI should replace the UglifyJS plugin with an ES6-compatible plugin (such as Babili) or the CLI should disable minifying when the target is ES6.

Another option would be to expose a flag to developers to disable minifying.

Mention any other details that might be useful.

#5730 #5352 #4554 and #3191 are all issues that have been closed because the CLI does not support an ES6 target.

There is no open issue to track ES6 support, and with over 1 billion devices supporting ES6 with Chrome and Safari, it does not make sense to limit developers to ES5 compiled code when the workaround is as easy as opting out of minifying.

@Brocco Brocco added effort2: medium (days) P5 The team acknowledges the request but does not plan to address it, it remains open for discussion severity2: inconvenient labels May 18, 2017
@Brocco Brocco self-assigned this May 18, 2017
@aldo-roman
Copy link

aldo-roman commented May 23, 2017

We are covering ES2015 target support on #2907

Also ES6 has been renamed to ES2015, let's better use the standard name.

@hotforfeature
Copy link
Author

To be clear, it has not been renamed, the official name is "ECMAScript 2015", the 6th edition of ECMAScript. It has been abbreviated by the community as ES2015 or ES6. Neither of those abbreviations are standard from Ecma International.

It does look like I missed #2907 in my search for related issues. @sumitarora you're assigned to that issue, but there's no severity or effort labels attached to it. That ticket was made back in October of 2016, has it fallen through the cracks?

@mfissehaye
Copy link

https://stackoverflow.com/a/43506162/4688650

@imcotton
Copy link
Contributor

I don't think this need to be configurable at all, simply overwritten to target: es5 during production build internally, and that's it.

@hotforfeature
Copy link
Author

@imcotton I disagree. I want to build the app compiled to ES6. This is possible using webpack or other build tools. There's no reason to force the developer to use ES5 when using the cli

@imcotton
Copy link
Contributor

@hotforfeature I meant without ejecting from cli, if however you decide to crafting without cli's help, you can do anything you like by ng eject already, right?

@jimmykane
Copy link

Any updates on this?

@filipesilva
Copy link
Contributor

Heya, I'm consolidating all the ES2015 support requests on the same issue, so it can be better actioned on.

Duplicate of #2907.

@filipesilva filipesilva marked this as a duplicate of #2907 Jul 28, 2017
@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
effort2: medium (days) P5 The team acknowledges the request but does not plan to address it, it remains open for discussion severity2: inconvenient
Projects
None yet
Development

No branches or pull requests

7 participants