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

Astro Lit integration breaks SCSS imports #5456

Closed
1 task done
riccardolardi opened this issue Nov 22, 2022 · 5 comments · Fixed by vitejs/vite#11079
Closed
1 task done

Astro Lit integration breaks SCSS imports #5456

riccardolardi opened this issue Nov 22, 2022 · 5 comments · Fixed by vitejs/vite#11079
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@riccardolardi
Copy link

riccardolardi commented Nov 22, 2022

What version of astro are you using?

1.6.10

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Mac

Describe the Bug

Reproduction:

  • yarn create astro
  • yarn add -D sass
  • create file /src/_index.scss, add <style lang="scss"> and @import '../_index.scss'; to /src/pages/index.astro
  • yarn dev, visit localhost:3000, all fine
  • yarn astro add lit
  • yarn dev, visit localhost:3000, error: Sass: Can't find stylesheet to import.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-2hn57u?file=src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
@bluwy
Copy link
Member

bluwy commented Nov 24, 2022

This is quite similar to #5441 but I can confirm this bug happening before 1.6.3 too so maybe there's a different cause to it.

@bluwy bluwy self-assigned this Nov 24, 2022
@riccardolardi
Copy link
Author

@bluwy let me know if there's any way I can help. Would be glad to contribute!

@bluwy
Copy link
Member

bluwy commented Nov 24, 2022

Thanks @riccardolardi. Currently I'm still debugging how Vite resolve things in SCSS and reporting my findings at #5441. So far scss's JS API is just weird 🥲

@bluwy
Copy link
Member

bluwy commented Nov 25, 2022

Made a fix at vitejs/vite#11079. Was a pain to debug but it's over now 😄

@bluwy bluwy added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Nov 25, 2022
@bluwy
Copy link
Member

bluwy commented Nov 29, 2022

vitejs/vite#11079 has been merged. Closing this for now as the work has been done. I'll try to get this backported to Vite v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants