-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Relative CSS asset import does not work with root config set #18117
Labels
feat: css
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
Comments
Slightly simplified reproduction without the dependency It looks like Vite uses a relative path for lightningcss, so vite/packages/vite/src/node/plugins/css.ts Lines 3024 to 3027 in ba56cf4
|
hi-ogawa
added
feat: css
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
and removed
pending triage
labels
Sep 17, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
feat: css
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
Describe the bug
#17856 broke relative CSS asset imports from node_modules when
root
config is set.vite/packages/vite/src/node/plugins/css.ts
Line 3032 in 37881e7
dep.loc.filePath
is used asimporter
, but that path is relative (../../node_modules/.pnpm/@fontsource
) and causes the asset path to be resolved to a path outside the project.Reproduction
https:/Demivan/vite-css-asset-resolution-bug
Steps to reproduce
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: