-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 CSS @import
#6816
Conversation
🦋 Changeset detectedLatest commit: d0dc54e 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 |
This PR is blocked because it contains a |
Is there a world in which using a plugin like https://github.com/aleclarson/vite-tsconfig-paths would reduce the amount of code we need to do ourselves and potentially reduce maintenance work here? |
If the patch works in this PR, I can upstream the changes too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Would love to see us use an upstream plugin for this in the future to reduce the maintenance burden though
Changes
Fix #6551 (take 2)
Supersedes #6626
This PR refactors
vite-plugin-config-alias
, and adds aconfig.createResolver
patch that would make this plugin apply to CSS@import
too. Even though this is a bit hacky, it's the only way to make it work completely.Testing
#6812 added tests that previously caused regressions.
This PR also adds more tests for dev and build, and runs on Windows too.
Docs
n/a. Import aliases in the docs should already implicitly apply for style
@import
too, so I don't think this needs to be explicitly documented.