Lazy-loaded routing pages do not generate declarations in `auto-imports.d.ts`
See original GitHub issueThe type declaration is generated in auto-imports.d.ts
only when it needs to be loaded into a lazy-loaded routing page.
The auto-imports.d.ts
file is reset every time the project is built; if the lazy loading page is not loaded, the auto-imports declaration will not be generated, and the project file will indicate that the module cannot be found at this time
reproduction project: https://stackblitz.com/github/Mrlilili/auto-import-test?file=src/typings/auto-imports.d.ts
https://user-images.githubusercontent.com/8361655/179142755-ee045cac-d146-434f-a6fe-adf5cde92982.mov
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Lazy loading don't find the declaration of my component
ts, my component "DialogConfirmacaoExclusao" is alerted that is not part of any ngModule. I try: My app routing module: import { NgModule }...
Read more >Lazy-loading feature modules - Angular
Create the feature module with the Angular CLI, using the --route flag. ... Because the new module is meant to be lazy-loaded, the...
Read more >Advanced Features: Dynamic Import - Next.js
Dynamically import JavaScript modules and React Components and split your code into manageable chunks.
Read more >Resolving errors faced while implementing Lazy Loading with ...
Check that the imported modules of a feature module is not also a lazy-loaded module with a route. Consider PreloadAllModules. Angular will ...
Read more >How To Use Lazy Loading Routes in Angular | DigitalOcean
The following covers lazy loading modules in Angular 8+ apps. · Do not import feature modules that should be lazy-loaded in your app...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have the same problem
My scenario is some pages with manual import API and some pages without manual import Vue-tsc --noEmit failed directly when I built because auto-imports. D. ts doesn’t have this API
Because performance considerations are the result? I really wish the auto-imports. D. ts generation rule would provide a configuration item for the user to decide if it is full
At the moment I have to agree on my own rules of use: either no manual import at all or manual import of all pages
I look forward to your solution
项目庞大,并且是多人协作开发的时候,我无法知晓哪些已经使用过的,维护起来苦不堪言,还是需要自动生成的。