Skip to content

AoT Uglify error SyntaxError: Unexpected token: punc #11555

@antonybudianto7

Description

@antonybudianto7

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
ngc -p . worked well, but when tried to bundle it with webpack, I got error like this

stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^
Error: bundle.js from UglifyJs
SyntaxError: Unexpected token: punc ({) [./~/@angular/core/src/change_detection/change_detection.js:8,0]

All angular version have been updated to rc.7 (rc.6 had the same issue too)

Expected behavior
It should bundle well

Reproduction of the problem
clone https://github.com/antonybudianto/angular2-starter
checkout to feat-compiler-cli branch
then

npm i

npm run serve-build

What is the motivation / use case for changing the behavior?
Bundle the AoT result

Please tell us about your environment:
Ubuntu 14.04

  • Angular version: 2.0.0-rc.6 and 2.0.0-rc.7
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    All
  • Language: [all | TypeScript 2.0.2 ]
  • Node (for AoT issues): node --version = v6.5.0

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions