Skip to content

@ngtools/webpack v1.2.9 doesn't produce factories for lazy routes #4637

@Reuvenc

Description

@Reuvenc

Hi,

Updating to version 1.2.9 from 1.2.8 broke lazy loaded components using routes.
In the previous version, webpack produced separate chunk for each lazy route as expected.
In the current version, same process didn't produce the chunks.

OS?

Mac OSX (Sierra)

Versions.

@ngtools/webpack v1.2.9

The log given by the failure.

error_handler.js:55EXCEPTION: Uncaught (in promise): Error: Cannot find module '../../components/+home/home.module.desktop.ngfactory'.
Error: Cannot find module '../../home/home.module.desktop.ngfactory'.
    at webpackEmptyContext (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:40935:8) [angular]
    at SystemJsNgModuleLoader.loadFactory (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:44662:40) [angular]
    at SystemJsNgModuleLoader.load (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:44634:35) [angular]
    at RouterConfigLoader.loadModuleFactory (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:18286:128) [angular]
    at RouterConfigLoader.load (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:18273:81) [angular]
    at MergeMapSubscriber.project (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:65418:111) [angular]
    at MergeMapSubscriber._tryNext (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:19101:27) [angular]
    at MergeMapSubscriber._next (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:19091:18) [angular]
    at MergeMapSubscriber.Subscriber.next (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:685:18) [angular]
    at ScalarObservable._subscribe (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:38681:24) [angular]
    at ScalarObservable.Observable.subscribe (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:118:27) [angular]
    at MergeMapOperator.call (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:19066:23) [angular]
    at Observable.subscribe (http:/localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:115:22) [angular]
    at MergeMapOperator.call (http://localhost:9001/app/main.js?9bcb4af7f8d2ef215eba:19066:23) [angular]

Mention any other details that might be useful.

// package.json
"dependencies": {
    "@angular/common": "2.4.5",
    "@angular/compiler": "2.4.5",
    "@angular/compiler-cli": "2.4.5",
    "@angular/core": "2.4.5",
    "@angular/forms": "2.4.5",
    "@angular/http": "2.4.5",
    "@angular/platform-browser": "2.4.5",
    "@angular/platform-browser-dynamic": "2.4.5",
    "@angular/platform-server": "2.4.5",
    "@angular/router": "3.4.5"
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: investigationRequires some digging to determine if action is neededneeds: more infoReporter must clarify the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions