create-vue icon indicating copy to clipboard operation
create-vue copied to clipboard

Maybe can provide an option to choose less/scss...

Open btea opened this issue 2 years ago • 3 comments

Hello, the current project basically uses the CSS extension language to write styles, so I think that might be good to provide an option to choose to add it.

What do you think?

btea avatar Feb 18 '22 09:02 btea

This is just needly option !

tarunama avatar Jul 04 '22 06:07 tarunama

Alternatively it might be worth integrating https://github.com/unocss/unocss as an option.

stefnotch avatar Aug 16 '22 10:08 stefnotch

Thank you for your input.

I have some concerns about adding this option to the scaffold:

  1. Vite's Official Recommendation: Vite encourages using modern CSS features instead of these preprocessors. It's because Vite is designed for modern browsers, so it's better to use plain CSS with some helpful tools like postcss-nesting. This way, you're writing future-proof CSS. You can read more about this in the Vite documentation.

  2. Simplicity: You can actually use these preprocessors with Vite quite easily, and there's a guide in the Vite documentation that shows you how. So, adding them to our templates might not bring much extra value, but it could make maintenance more complicated.

  3. Performance Concerns: Some of these preprocessors, like less, can slow down your project without offering many extra benefits. If you don't really need them, it's best to stick to regular CSS.

  4. Tailwind CSS: In terms of popularity, 'less' and 'stylus' have been less popular than Tailwind CSS for a while (you can check here). However, Tailwind CSS already has its own scaffold (https://tailwindcss.com/docs/guides/vite#vue), so there's no need to duplicate the effort here.

Considering these points, I don't think adding another option to create-vue is the right move. But I'm open to the idea of improving our documentation to help users with CSS-related issues.

sodatea avatar Sep 04 '23 13:09 sodatea