fix(vite-plugin-angular): process styles in jit mode instead of returning raw output#2024
Merged
Merged
Conversation
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
AlonMiz
pushed a commit
to AlonMiz/analog
that referenced
this pull request
Mar 1, 2026
The resolveId hook uses `??` (double question mark) for the style/template
suffix, producing URLs like `path??inline`. This is incorrect because:
- `?inline` → URL search params: `{ inline: '' }` ✅ (Vite recognizes this)
- `??inline` → URL search params: `{ '?inline': '' }` ❌ (Vite does NOT recognize this)
With `??inline`, Vite's CSS pipeline does not process the file, so SCSS/LESS
files are loaded as raw text without preprocessing. This causes production
Storybook builds to contain raw SCSS (e.g., `&.class-name` nesting) instead
of compiled CSS.
The fix changes `??` to `?` so Vite correctly identifies the file as an
inline CSS import and runs it through the CSS preprocessor pipeline.
Fixes the regression introduced in bcb6da9 (PR analogjs#2024).
AlonMiz
pushed a commit
to AlonMiz/analog
that referenced
this pull request
Mar 1, 2026
The resolveId hook uses `??` (double question mark) for the style/template
suffix, producing URLs like `path??inline`. This is incorrect because:
- `?inline` → URL search params: `{ inline: '' }` ✅ (Vite recognizes this)
- `??inline` → URL search params: `{ '?inline': '' }` ❌ (Vite does NOT recognize this)
With `??inline`, Vite's CSS pipeline does not process the file, so SCSS/LESS
files are loaded as raw text without preprocessing in production builds.
Fixes the regression introduced in bcb6da9 (PR analogjs#2024).
Fixes analogjs#2094
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Closes #2018
What is the new behavior?
When building in JIT mode, JIT styles are processed inline instead of returned as-is. This fixes an issue when building Storybook components with external component styles.
Does this PR introduce a breaking change?
Other information
[optional] What gif best describes this PR or how it makes you feel?