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

feat: refactor vite styles plugin #338

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

userquin
Copy link
Member

@userquin userquin commented Aug 24, 2024

This PR includes:

  • simplify virtual logic: refactor logic to remove any virtual usage: using target mapping from .css to .sass + writing temporary SASS files when using SASS Variables (will solve missing sass source warnings and SSR problems when using Nuxt) ✔️ we only need to fix vue router warnings when running Nuxt with SSR enabled
  • handle none and object styles notation at once
  • include useViteFileImport in shared options
  • docs: include similar hint to Vuetify docs in readme file

You can check the following repos and the corresponding PR:

supersedes #332

@userquin userquin requested a review from KaelWD August 24, 2024 14:00
@userquin userquin marked this pull request as draft August 25, 2024 08:59
@userquin userquin marked this pull request as ready for review August 25, 2024 16:39
@userquin userquin marked this pull request as draft August 26, 2024 16:47
@userquin userquin marked this pull request as ready for review August 26, 2024 18:44
@userquin
Copy link
Member Author

userquin commented Aug 26, 2024

uhmm, with ?inline there is flickering in Nuxt dev server when refreshing page with SSR.

@userquin userquin marked this pull request as draft August 26, 2024 21:09
@userquin userquin marked this pull request as ready for review August 27, 2024 15:36
@userquin
Copy link
Member Author

@KaelWD now it works in Vite and Nuxt with and without SSR (no vue-router warnings for virtual SASS files requests), updated linked repos PR if you want to check it (using same logic here).

@TechAkayy
Copy link

TechAkayy commented Aug 28, 2024

Thanks @userquin, I just tested modern sass api on my sample repo here - https://github.com/pinegrow/pg-vue-vuetify. Especially, when I work on vuetify with Vue Designer, sass updates use to be very sluggish. With sass modern api, I feel its pretty smooth, HMR is quite fast as well. Can't wait for this update to be out, especially for Nuxt app where more auto-magic happens.

@userquin userquin marked this pull request as draft September 16, 2024 10:27
@userquin userquin changed the title feat!: refactor vite styles plugin feat: refactor vite styles plugin Oct 6, 2024
@userquin userquin marked this pull request as ready for review October 6, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants