Building with @angular/material v13 @use statements are failing
See original GitHub issueType of Issue
[x] Bug Report
[ ] Feature Request
Description
After updating to v13 this morning, which removed all of the tildes from material’s @use
statements, our library isn’t building, saying it can’t find the stylesheet. If I add the tildes back, it builds fine. Using without the tilde is working ok in the context of an application, but ng-packagr seems to still need them. This causes a really ugly catch 22, since our styles can’t have tildes to work with applications, but need them to work with the library build.
Error
------------------------------------------------------------------------------
Building entry point '@fabric/components/breadcrumbs'
------------------------------------------------------------------------------
× Compiling with Angular sources in Ivy partial compilation mode.
Can't find stylesheet to import.
╷
7 │ @use '@angular/material' as mat;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
breadcrumbs\breadcrumbs.component.scss 7:1 root stylesheet
error Command failed with exit code 1.
Version Information
ng-packagr: 13.0.0
@angular/*: 13.0.0
typescript: 4.4.4
rxjs: 7.4.0
node: 14.17.0
yarn: 1.22.15
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
angular 13 ng build library fails (ivy partial compilation mode)
This solution appears to be for an Angular app. I'm trying to build a library. · 2. This is why i wrote "if...
Read more >Deprecated APIs and features - Angular
Use non-factory based framework APIs. v13, Since Ivy, Component factories are not required. Angular provides other APIs where Component classes can be used ......
Read more >Angular 13 in Depth - Sébastien Dubois
With this release, Angular now uses the persistent build cache by ... With Angular 13, the accessibility of Angular Material MDC-based ...
Read more >Troubleshooting | jest-preset-angular - GitHub Pages
To patch it for Angular Material, use this workaround. ... SyntaxError: Cannot use import statement outside a module ... Coverage fail but tests...
Read more >Build a Beautiful App + Login with Angular Material
In this tutorial, I'll show you how to create a login form like the one above. You'll create an Angular app, use Material...
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
Yeah, you are right. Let me do that.
@alan-agius4 Thanks for the quick turnaround!