Skip to content

[Bug] Webpack hangs when requiring external templates/css inside components with an app-shell project #1502

@juristr

Description

@juristr

OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX El Capitan

Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: local (v1.0.0-beta.10, branch: master)
node: 5.6.0
os: darwin x64

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.

Generate a new app targeted for mobile with app-shell and stuff using ng new testapp --mobile. That installs just fine and runs. Then add a new component like ng g component demo. That works as well, however if you then import that generated <app-demo> component in app.component.ts and run ng serve, webpack hangs with this message:

...
16ms hashing
1ms module assets processing
92ms chunk assets processing
25ms additional chunk assets processing
0ms recording
0ms additional asset processing
182ms chunk asset optimization
 94% asset optimizationwebpack: wait until bundle finished: /app/demo.component.html

After a while I get an exception from zone.js:

EXCEPTION: Failed to load app/demo.component.html
ngOnInit Error: Failed to load app/demo.component.html
Unhandled Promise rejection: Failed to load app/demo.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app/demo.component.html
{ [Error: Uncaught (in promise): Failed to load app/demo.component.html]
  rejection: 'Failed to load app/demo.component.html',
...

Mention any other details that might be useful.

This entire workflow above runs perfectly when generating a "plain normal" project without the app-shell.

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