Skip to content

Conversation

@alex-kinokon
Copy link
Contributor

@alex-kinokon alex-kinokon commented Sep 2, 2024

Description

Fixes #17984. This adds optional type definition to CSSOptions.preprocessorOptions. Users who have installed sass will see the correct types, while others will simply see it as any:

Capture d’écran, le 2024-09-02 à 16 39 30

@bolt-new-by-stackblitz
Copy link

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

@alex-kinokon alex-kinokon changed the title Externalize SASS types fix: add SASS typing to CSSOptions.preprocessorOptions Sep 2, 2024
@sapphi-red sapphi-red added feat: css p2-nice-to-have Not breaking anything but nice to have (priority) labels Sep 9, 2024
@sapphi-red sapphi-red changed the title fix: add SASS typing to CSSOptions.preprocessorOptions fix: add typing to CSSOptions.preprocessorOptions Sep 9, 2024
sapphi-red
sapphi-red previously approved these changes Sep 9, 2024
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I added types for less and stylus and resolved the conflict.

I tested the built package with create-vite and it worked as expected.

patak-dev
patak-dev previously approved these changes Sep 9, 2024
@patak-dev
Copy link
Member

/ecosystem-ci run

@patak-dev patak-dev added this to the 6.0 milestone Sep 9, 2024
@vite-ecosystem-ci
Copy link

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Sep 17, 2024

Speaking of optional peer deps, it looks like currently lightningcss typing is partially bundled (maybe this is related? #14209). Perhaps, this could be also externalized with @ts-ignore? (not in this PR, but maybe later)

@sapphi-red
Copy link
Member

@hi-ogawa Yeah, I think we can do this for lightningcss too.

bluwy
bluwy previously approved these changes Sep 18, 2024
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finishing this up sapphi!

@bluwy bluwy dismissed stale reviews from patak-dev, sapphi-red, and themself via 39f96e0 October 23, 2024 13:56
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: css p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSSOptions.preprocessorOptions is missing types

5 participants