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

fix(css): fix directory index import in sass modern api #17960

Merged
merged 4 commits into from
Sep 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: cleanup
  • Loading branch information
hi-ogawa committed Aug 28, 2024
commit b48ef3de7f2793507a23c3e3e0630f1e998a9124
5 changes: 2 additions & 3 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1095,9 +1095,8 @@ function createCSSResolvers(config: ResolvedConfig): CSSAtImportResolvers {
preferRelative: true,
})
sassResolve = async (...args) => {
const id = args[0]
if (id.startsWith('file://')) {
args[0] = fileURLToPath(id)
if (args[0].startsWith('file://')) {
args[0] = fileURLToPath(args[0])
}
return resolver(...args)
}
Expand Down