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: add css config option, don't process CSS by default #1467

Merged
merged 8 commits into from Jun 14, 2022

Conversation

sheremet-va
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Jun 12, 2022

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 026cbf5
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/62a8d47388165000089427d4
😎 Deploy Preview https://deploy-preview-1467--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sheremet-va sheremet-va requested a review from antfu June 12, 2022 09:20
*
* @default [/\.module\./]
*/
processCss?: boolean | RegExp[]
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a great DX improvement. About naming, given that there is already a css option in Vite, maybe this new option could be aligned with it:

  css: {
    include: RegExp | RegExp[], // @default [/\.module\./]
    exclude: RegExp | RegExp[]
  }

Removing the process in the name could be helpful if there are other CSS options added later. Or maybe css: boolean | { include, exclude } if you still want users to use css: true

Copy link
Member Author

Choose a reason for hiding this comment

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

I think if we want to add more features to css, they should be added to Vite’s options :)

About the object - I think yes, we can align it with other similar options.

@sheremet-va sheremet-va changed the title feat: add processCss config option, don't process CSS by default feat: add css config option, don't process CSS by default Jun 13, 2022
@sheremet-va sheremet-va requested a review from antfu June 13, 2022 10:51
docs/config/index.md Outdated Show resolved Hide resolved
@sheremet-va sheremet-va enabled auto-merge (squash) June 14, 2022 18:04
@sheremet-va sheremet-va enabled auto-merge (squash) June 14, 2022 18:40
@sheremet-va sheremet-va merged commit 68715b6 into vitest-dev:main Jun 14, 2022
@sheremet-va sheremet-va deleted the feat/process-css branch August 12, 2022 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants