Closed
Description
Describe the bug
This is a regression of #17909
@userquin found an issue when testing pkg-pr-new release for vuetify https://github.com/userquin/vuetify-vite-modern-sass/
I'm still not sure if this is Vite side bug. This could be due to some inconsistency of how sass triggers custom importers.
// src/main.scss
@import "/src/test.scss"; // no issue if @import "./test.scss"
// src/test.scss
@import "./dir";
// src/dir/index.scss
.test {}
Reproduction
https://github.com/hi-ogawa/reproductions/tree/main/vite-17909-sass-import-directory-index
Steps to reproduce
For some reason, the error doesn't happen on stackblitz.
npx tiged hi-ogawa/reproductions/vite-17909-sass-import-directory-index repro
cd repro
npm i
npm run build # or dev
x Build failed in 151ms
error during build:
[vite:css] [sass] EISDIR: illegal operation on a directory, read
╷
1 │ @import "./dir"
│ ^^^^^^^
╵
src/test.scss 1:9 @import
src/main.scss 5:9 root stylesheet
file: /home/hiroshi/code/personal/reproductions/repro/src/main.scss
System Info
System:
OS: Linux 6.10 Arch Linux
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
Memory: 23.41 GB / 31.06 GB
Container: Yes
Shell: 5.2.32 - /usr/bin/bash
Binaries:
Node: 20.16.0 - ~/.volta/tools/image/node/20.16.0/bin/node
npm: 10.8.1 - ~/.volta/tools/image/node/20.16.0/bin/npm
pnpm: 9.8.0 - ~/.volta/bin/pnpm
Browsers:
Chromium: 128.0.6613.36
npmPackages:
vite: https://pkg.pr.new/vite@561b940 => 5.4.2
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.