refactor: migrate to vite for critical scss bundling, remove dart sass dependency

Signed-off-by: Sped0n <hi@sped0n.com>
This commit is contained in:
Sped0n
2025-11-12 16:56:30 +08:00
committed by Ryan
parent 8b3b5cd77a
commit 4b1f529589
9 changed files with 309 additions and 30 deletions

View File

@@ -2,8 +2,8 @@
{{- $fingerprint := .Scratch.Get "fingerprint" | default "" -}}
{{- /* critical style */ -}}
{{- $style := dict "Source" "scss/critical.scss" "Fingerprint" $fingerprint -}}
{{- $options := dict "enableSourceMap" true "includePaths" (slice "node_modules") "transpiler" "dartsass" -}}
{{- $style := dict "Source" "bundled/critical.css" "Fingerprint" $fingerprint -}}
{{- $options := dict "enableSourceMap" false -}}
{{- $style = dict "Context" . "ToCSS" $options "Inline" true "Template" true | merge $style -}}
{{- partial "plugin/style.html" $style -}}