Skip to content

Webpack Angular2 does not work with node_modules #12952

@lukemadera

Description

@lukemadera

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
Building an angular2 component and using it from npm does not work - the webpack build finishes fine but it gives an error in the browser:
Uncaught Error: Unexpected value 'PLIconModule' imported by the module 'AppModule'(…)

Expected behavior
No error in the browser.

Minimal reproduction of the problem with instructions
Add an angular2 component as an npm dependency and try to import it and build with webpack.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:
Mac OSX

  • Angular version: 2.0.X

  • Browser: [all]

  • Language: [TypeScript X.X]

  • Node (for AoT issues): node --version = v5.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions