Angular 10 throw warning when using path alias
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/~10.0.14Is this a regression?
NoDescription
WARNING in src\app\users\user.component.ts depends on '@user/shared/selectors/selector'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
Iβm using @user/shared/selectors/selector to shorten the import path
In tsconfig.base.json
"paths": {
"@user/*": ["src/app/user/*"]
},
π Your Environment
@angular-devkit/architect 0.1000.8
@angular-devkit/build-angular 0.1000.8
@angular-devkit/build-optimizer 0.1000.8
@angular-devkit/build-webpack 0.1000.8
@angular-devkit/core 10.0.8
@angular-devkit/schematics 10.0.8
@angular/cdk 10.1.3
@angular/cli 10.0.8
@angular/material 10.1.3
@ngtools/webpack 10.0.8
@schematics/angular 10.0.8
@schematics/update 0.1000.8
rxjs 6.6.2
typescript 3.9.7
webpack 4.43.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:15
Top Results From Across the Web
Angular 10 path aliases issue - typescript
I am trying to use path aliases for services & components so that I can avoid messy imports. My services are under src/app/services...
Read more >Schematics for libraries
In your library project's package.json file, add a "schematics" entry with the path to your schema file. The Angular CLI uses this entry...
Read more >Top 18 Most Common AngularJS Developer Mistakes
In this article you will learn about most common AngularJS developer ... a new $digest cycle is fired (up to a maximum of...
Read more >sass-loader - webpack - JS.ORG
The presented code will throw webpack warning instead logging. To ignore unnecessary warnings you can use the ignoreWarnings option. webpack.config.js module.
Read more >Node.js v19.3.0 Documentation
Building; Linking to libraries included with Node.js ... WARNING: This does not throw an AssertionError in legacy assertion mode! ... Added in: v10.0.0....
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 Free
Top 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
This should be fixed in @angular-devkit/build-angular 0.1001.4
This seems like a bug but weβll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via
ng new repro-app
and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.This might be related to your directory structure so its really important to get an accurate repro to diagnose this.