Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

at-loader throws error for an AoT module even though building in dev mode #371

Closed
papaiatis opened this issue Feb 13, 2017 · 2 comments
Closed

Comments

@papaiatis
Copy link

I have a MEAN project with Angular 2 and configured dev and prod builds. The latter uses Angular AoT stuff. When I updated ATL from 2.2.4 to 3.0.0 I'm getting the following error when building in dev mode:

ERROR in [at-loader] assets/app/main.aot.ts:6:36
TS2307: Cannot find module './app.module.ngfactory'.

The file main.aot.ts is the entry point of my production build so nothing to do with dev build.
I have to explicitly exclude this file in tsconfig.json and also exclude main.ts (dev mode) in tsconfig.aot.json.
This wasn't necessary before.

So what has changed?

@harshes53
Copy link

@papaiatis ditto!

If I delete *.aot.ts and run the dev build it works fine, unless the same as you described, meaning it always runs *.aot.ts regardless even if it wasn't mentioned as entry file in webpack config or imported into any module.

@s-panferov please help!

@s-panferov
Copy link
Owner

Dup of #364

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants