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

fix: add typing to CSSOptions.preprocessorOptions #18001

Merged

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

Copy link

stackblitz bot commented Sep 2, 2024

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
Collaborator

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
@patak-dev patak-dev merged commit 7eeb6f2 into vitejs:main Oct 24, 2024
14 checks passed
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