-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Angular compilation initialization failed
thrown when using "styles: \...\
"
#49
Comments
I may have found a solution: https://stackblitz.com/edit/stackblitz-starters-thdpjkfi?file=src%2Fmain.ts It looks like they are missing |
Update 2 I see that that was removed in the v19 PR by just changing it to However, I am a bit confused. When I look in the angular.dev docs, I mostly see mentions of the As for The |
@JeevanMahesha, since you did the Angular v19 PR, thoughts? |
@michael-small Thank you for reporting this issue. it's fixed in this PR #50, |
Thank you! |
Background
(links to repro at end)
Angular projects can define styles directly inside the
@Component
decorator like so: https://angular.dev/guide/components/stylingHowever...
The Bug
The following error is thrown when serving an Angular app with the latest starter with such
styles
declaration (that are not empty)That said, when I download the project and run it locally (link to repo in the last section), it works as intended.
Other notes
styles
in Stackblitz until this issue in the last day or twostyles
that just works: https://stackblitz.com/edit/bfjmf2-k1gcxd?file=src%2Fmain.ts. However, I think I have had this upgraded since v18 so it probably is configured different out of the box before I made major changes anyways.Links to Reproductions
Broken Stackblitz project: https://stackblitz.com/edit/stackblitz-starters-8q9thuwb?file=src%2Fmain.ts
Downloaded project repo, which can be ran with
npm install && npm start
: https://github.com/michael-small/stackblitz-angular-styles-errorThe text was updated successfully, but these errors were encountered: