Build scss into css, find it via the manifest #13080
Unanswered
WhyNotHugo
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a web application which includes a set of Vue SFC. Only a few specific pages have any Vue components in them, and the rest have no JS.
My Vue setup also compiles a standalone SCSS into CSS. All pages depend on the styles defined in this file, so the CSS is included globally, while JS scripts are only included in specific pages.
Until Vue 3.3 + Vite 4.5, I've been ensuring that this SCSS gets compiled into a standalone CSS, locating it via manifest.json, and including it in all pages.
When upgrading to Vue 3.4 + Vite 6.2, I find that the CSS files are no longer included in the manifest in the same way. If I understand correctly, they're now loaded via JS instead. They won't load for me on pages that include no JS; I still need to include it myself by finding it in the manifest.
I feel like I've been hacking my way around this situation on each upgrade, so I'm looking for advise on a recommended approach for my use case.
TLDR: How can I configure vite to compile a specific scss file into a css and keep include it in
manifest.json
?Context
My current
vite.config.js
(partially migrated as indicated above) looks something like this:Beta Was this translation helpful? Give feedback.
All reactions