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

sass directory index import fails in some cases after #17909 #17959

Closed
7 tasks done
hi-ogawa opened this issue Aug 28, 2024 · 0 comments · Fixed by #17960
Closed
7 tasks done

sass directory index import fails in some cases after #17909 #17959

hi-ogawa opened this issue Aug 28, 2024 · 0 comments · Fixed by #17960

Comments

@hi-ogawa
Copy link
Collaborator

hi-ogawa commented Aug 28, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant