unplugin-vue
unplugin-vue copied to clipboard
feat: expose more `SFCStyleCompileOptions` in style option
Description
Expose more SFCStyleCompileOptions in style option. Because sometimes we need pass some parameters like preprocessLang into compileStyleAsync in @vue/compiler-sfc.
Additional context
See this code in vue official playground. It produce a css output:
.parent[data-v-7ba5bd90] {
background-color: black;
&_child[data-v-7ba5bd90] {
background-color: white;
}
}
But sass can't process this output, so we need pass preprocessLang into compileStyleAsync to call it internal preprocessor. But there isn't option preprocessLang in Options.style. So it need to be expanded.
Run & review this pull request in StackBlitz Codeflow.
LGTM, but we'd better contribute the PR to upstream https://github.com/vitejs/vite-plugin-vue first.