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: expose more SFCStyleCompileOptions in style option #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuzheng14
Copy link

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.

@stackblitz
Copy link

stackblitz bot commented Oct 12, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sxzz sxzz changed the title fix(core/index): expose more SFCStyleCompileOptions in style option feat: expose more SFCStyleCompileOptions in style option Nov 16, 2023
@sxzz sxzz changed the title feat: expose more SFCStyleCompileOptions in style option feat: expose more SFCStyleCompileOptions in style option Nov 16, 2023
@sxzz
Copy link
Member

sxzz commented Nov 16, 2023

LGTM, but we'd better contribute the PR to upstream https://github.com/vitejs/vite-plugin-vue first.

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