Skip to content

Consider allowing alternate minifier instead of uglify for better ESNext support #490

@delebash

Description

@delebash

I'm submitting a feature request

  • Library Version:
    0.24.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    7.50

  • NPM Version:
    4.0.5
  • Browser:
    Chrome 56

  • Language:
    ESNext

Current behavior:
UglifyJS does not support some ESNext features available in babel and current browsers such as Generators and Async Functions.

Both fail with error 'SyntaxError: Unexpected token operator «*», expected punc «(»',

Expected/desired behavior:
ESNext features supported by babel should also be supported by the aurelia-cli minification process.

To reproduce
Add a generator function to your code and run au build --env prod

Possible solutions:
If the minification process is extracted to a gulp task then the user can swap out uglify with
babili which supports the same features as babel.

Uglify does have a harmony version which has better support for ESNext features but there is a long discussion on which might be better to use moving forward. By extracting to a gulp task it gives the user the ability to choose.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions