Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
@DimitarTachev

Description

@DimitarTachev

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

  1. Create an Angular app with lazy routes (e.g. use our tabs template)
  2. 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/*" ] })
  3. Edit your main.ts file and import the app module using the custom paths (e.g. import { AppModule } from '@src/app/app.module';)
  4. 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions