This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
no such file or directory, stat app-routing.module.ngfactory.js #566
Labels
Comments
Thanks for reporting that! |
sis0k0
added a commit
that referenced
this issue
Jun 19, 2018
Calling `require.context` for the app directory adds a `ContextDependency` in webpack for it. That causes every change inside the app/ directory to emit a change event for the whole directory. There's a logic in the TypeScript compiler host (from [@ngtools/webpack](https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/compiler_host.ts#L235)) that invalidates all files in the changed directory. The invalidation removes all cached information for the virtual files produced by the Angular AoT compilation (ngfactory files, etc.). Since these files are not in the cache anymore, webpack tries to resolve them from the filesystem and fails. The solution is to remove the `ContextDependency` for the `app` dir, which should also make the rebuilds much faster. fixes #566
7 tasks
sis0k0
added a commit
that referenced
this issue
Jun 22, 2018
Calling `require.context` for the app directory adds a `ContextDependency` in webpack for it. That causes every change inside the app/ directory to emit a change event for the whole directory. There's a logic in the TypeScript compiler host (from [@ngtools/webpack](https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/compiler_host.ts#L235)) that invalidates all files in the changed directory. The invalidation removes all cached information for the virtual files produced by the Angular AoT compilation (ngfactory files, etc.). Since these files are not in the cache anymore, webpack tries to resolve them from the filesystem and fails. The solution is to remove the `ContextDependency` for the `app` dir, which should also make the rebuilds much faster. fixes #566
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Checklist
Tell us about the problem
Hi, first this issue might look like a duplicate of #547, but it is not because the issue was marked resolved in 0.13 and I use that version.
Step to reproduce:
tns run android --bundle --env.aot
Local environment
Project data
@sis0k0
The text was updated successfully, but these errors were encountered: