UnoCss
I feel like a complete idiot. Im looking to add UnoCss to a fresh ct3a repo. Should I just go fro the CLI version and add it to my build and dev scripts?
15 Replies
Well, I followed this article I found https://thundermiracle.com/blog/en/2022-06-07-next-with-unocss/
Problem is, running unocss on my tsx file produces 0 generated utilites
Use UnoCSS with Next.js
After reading Anthony Fu’s Reimagine Atomic CSS blog, I’m starting to want to use UnoCSS. Right now, I’m planning to migrate my HP & blog from GatsbyJS to Next…
I modified part of the standard template to have a classname I'd expect to work
But to no success
did you try the instructions here first? https://github.com/unocss/unocss/tree/main/packages/webpack
GitHub
unocss/packages/webpack at main · unocss/unocss
The instant on-demand atomic CSS engine. Contribute to unocss/unocss development by creating an account on GitHub.
also tbh with next just stick with tailwind, i love uno, its fantastic and i use it for everything thats not next
setups like the ones in your article arent worth it
I have not tried those. Would I create a webpack.config.js in my project root then?
next.config.js: Custom Webpack Config | Next.js
Extend the default webpack config added by Next.js.
again not really recommended, would stick with tailwind but thats how one would presumably do it
idk if swc affects this at all either
seems like there is more info and things to try here https://github.com/vercel/next.js/discussions/33254
GitHub
UnoCSS with Next.js · Discussion #33254 · vercel/next.js
Has anybody tried https://github.com/antfu/unocss with Next? Any best practices for integration? UnoCSS seems like a better and more flexible alternative to Tailwind CSS - for an introduction see h...
Allright! Thanks for the advice! Im guessing it's easier to use with other backends because they've got different build systems? Like vite for example? I'm kinda new to the whole JS space
yea uno kind of started after vite 2 was a thing so developing it for something webpack is kinda backwards for him
unjs made it so he could provide a webpack story but i dont think people should really use it
I see, well I've been meaning to try out astro anyways actually. So I might just go with that instead
yea if thats an option for you astro is great
Already got it up and running with astro. That was so much easier, thank you once again
No problem, sorry there isn't a good integration with uno
With next I mean