Skip to content

UglifyJs doesn't understand ES6 #487

Closed

Description

@joshaber

This is fallout from #484.

When building for prod, we get these sorts of errors:

ERROR in renderer.js from UglifyJs
SyntaxError: Unexpected token: name (DiffLine) [./app/src/models/diff.ts:8,0]

This is because UglifyJs doesn't understand ES6. This doesn't make the build fail, but it does mean the source isn't being minimized.

I see a few options:

  1. Ignore it / remove uglify.
  2. Revert RIP Babel #484.
  3. Make TypeScript target ES5 (though that might mean we'd lose async/await 😱).

Activity

  1. niik commented on Oct 5, 2016

    @niik
    Member

    And a possible #4 would be to use that experimental harmony branch in UglifyJS?

    mishoo/UglifyJS#448 (comment)

  2. joshaber commented on Oct 6, 2016

    @joshaber
    ContributorAuthor

    It wasn't clear to me how/if that works with Webpack, since mishoo/UglifyJS#448 (comment) would seem to indicate you also have to delete Webpack's copy of uglify 🤷

  3. joshaber commented on Oct 26, 2016

    @joshaber
    ContributorAuthor

    In order to fix #558, we're disabling Uglify for now.

  4. joshaber commented on Dec 15, 2016

    @joshaber
    ContributorAuthor
  5. added
    tech-debt
    on Feb 2, 2017
  6. joshaber commented on Apr 20, 2017

    @joshaber
    ContributorAuthor

    This'll be fixed by #1225, right @niik?

  7. locked as resolved and limited conversation to collaborators on Jul 22, 2018
  8. unlocked this conversation on Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions