Skip to content
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

Support tsconfig aliases in styles #6566

Merged
merged 1 commit into from
Mar 16, 2023
Merged

Support tsconfig aliases in styles #6566

merged 1 commit into from
Mar 16, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Mar 16, 2023

Changes

Fix #6551

Support tsconfig aliases in styles, like @import. This only supports compilerOptions.paths aliases for styles, but not baseUrl aliases since it's not possible to use Vite aliases without accidentally overriding Vite's internal aliases.

This could be a fine compromise for now as compilerOptions.paths aliases are more commonly used.

Testing

Added test for baseUrl alias and CSS @import.

Docs

n/a. bug fix. Maybe in the future we could document the baseUrl caveat if it turns out to be commonly used and confusing for users.

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2023

🦋 Changeset detected

Latest commit: f62d7bd

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 16, 2023
@bluwy bluwy merged commit ea9b3dd into main Mar 16, 2023
@bluwy bluwy deleted the tsconfig-styles branch March 16, 2023 17:04
@astrobot-houston astrobot-houston mentioned this pull request Mar 16, 2023
bholmesdev added a commit that referenced this pull request Mar 23, 2023
bholmesdev added a commit that referenced this pull request Mar 23, 2023
* Revert "Fix tsconfig alias regression (#6617)"

This reverts commit 38e6ec2.

* chore: changeset

* fix: add back fs

* chore: remove stray console log

* Revert "Support tsconfig aliases in styles (#6566)"

This reverts commit ea9b3dd.

* chore: add note on css style aliases
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Questions about style import of scss+svelte+astro
2 participants