Skip to content

[BUGFIX]: add lowercase alias ext:<extensionname> for SCSS imports - #41

Open
luisbecker-gh wants to merge 3 commits into
s2b:mainfrom
luisbecker-gh:fix/alias-in-scss
Open

[BUGFIX]: add lowercase alias ext:<extensionname> for SCSS imports#41
luisbecker-gh wants to merge 3 commits into
s2b:mainfrom
luisbecker-gh:fix/alias-in-scss

Conversation

@luisbecker-gh

Copy link
Copy Markdown

@import/@use Statements in SCSS do no work with the "EXT:" Syntax but with "@" it worked just fine. I discovered, that the SCSS resolve function always gets the import filepath as lowercase string.
Example:
@import "EXT:sitepackage" would match a alias like ext:sitepackage but not the existing alias EXT:sitepackage

This commit adds an additional alias with the lowercase ext:, so SCSS can resolve the files correctly.

Could you please verify my results and are there any concerns about extending the aliases that way?

Thank you!

I tested with:
npm packages:
vite@8.0.13
vite-plugin-typo3@3.0.0
sass-embedded@1.99.0

TYPO3:
TYPO3 13.3.33
praetorius/vite-asset-collector 1.18.1

Fixes: #19

@s2b

s2b commented Aug 5, 2026

Copy link
Copy Markdown
Owner

I haven't tested it myself, but your approach sounds reasonable. Could you adjust the unit tests to get the pipeline green? I'll probably add a integration test after that to verify the sass behavior (you can of course also tackle this, feel free to contact me for help)

@luisbecker-gh

Copy link
Copy Markdown
Author

The unit tests are fixed, I also had a go at the integration test. I had to add sass as dev-dependency. Let me know if you want it to be a seperate test instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scss variables and mixins are not available in imported scss-files when using Vite-alias (EXT:ext_name)

2 participants