feat: vite config postcss support exclude option#14110
Conversation
|
|
|
Is there anyone can help me check this pr plz? If there is any problem, please contact me anytime~ |
|
Can you explain your usecase for this feature? We don't have a lot of filters setup for our features, e.g. Could your CSS be move to |
Sometimes when a project introduces a third-party component library, there will be some css that has been processed. In some cases, you don’t want to postcss them. |
|
Thanks for the explanation. I think that make sense especially for postcss as it's transpiling CSS, while preprocessors are compiling to CSS. This reminds of #4653 which a I'll put this on the team board in case we want to properly pick an API to support this case. |
Thank you for taking it seriously! In fact, I'm a contributor to the taro community. We recently planned to adapt a new compilation mode for our framework for developers to choose, and we chose vite. This feature is very important to us, if it can be merged, then we will be very grateful~ |
By the way, not all the postcss plugins have the parameter to filter the files~ |
Description
Additional context
Vite config postcss supports exclude options.
Just like loader in webpack, developers can use the exclude option to filter the file which they don't want to process. Something like that:
postcss config in vite can also be written by this pattern:
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).