farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.65k stars 156 forks source link

[Feature Request]: custom CSS transformer support #1294

Open ThatOneCalculator opened 2 months ago

ThatOneCalculator commented 2 months ago

What problem does this feature solve?

Vite allows the use of a custom CSS transformer (only lightningcss as of right now), and having that functionality in Farm would be great.

What does the proposed API look like?

In farm.config.ts:

    css: {
        transformer: "lightningcss",
    },
wre232114 commented 2 months ago

Farm is based on plugins, so all transformers should be implemented as a plugin, we won't support css.transformer, instead, we'll provide a plugin-lightningcss later

ThatOneCalculator commented 1 month ago

Could https://github.com/lawrencecchen/vite-plugin-lightningcss be used as a base?

wre232114 commented 1 month ago

Yes, we'll provide a pure rust lightningcss plugin later(maybe this month, and PR welcome)