This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
Lazy routes of Angular apps with custom paths not found in preview #799
Closed
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 5.1.1
- Cross-platform modules: 5.1.0
Describe the bug
When the app.module
is imported from a module which has to be resolved based on the Typescript config paths
(e.g. @scr/app/app.module
), the webpack build is not generating any lazy chunks in preview and the app crashes runtime.
To Reproduce
- Create an Angular app with lazy routes (e.g. use our tabs template)
- Edit the
tsconfig
and add some custom paths. (e.g."paths": { "@src/*": [ "src/*.android.ts", "src/*.ios.ts", "src/*.tns.ts", "src/*.web.ts", "src/*" ] }
) - Edit your
main.ts
file and import the app module using the custom paths (e.g.import { AppModule } from '@src/app/app.module';
) - Preview the app using
tns preview --bundle
Expected behavior
We should be able to generate lazy chunks even when the app module is imported from a custom path.
Metadata
Metadata
Assignees
Labels
No labels