Thanks for the detailed background info on this! I'm currently in the process of adapting this approach for a Next.js app with varying levels of success. I was wondering if you found that you needed to use PostCSS to namespace the stylesheets rather than just wrap the individual theme files like so:
I haven't had 100% success with the latter approach, but jerry-rigging PostCSS into an already jerry-rigged Less config for Next.js hasn't been the most straightforward thing to do.
Hey, thanks for the heads-up! Somehow I haven't thought about the nesting capabilities of less... But yes that should work and would be way better than using another webpack plugin 😅
I'll try it on the weekend and might update the post accordingly
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the detailed background info on this! I'm currently in the process of adapting this approach for a Next.js app with varying levels of success. I was wondering if you found that you needed to use PostCSS to namespace the stylesheets rather than just wrap the individual theme files like so:
I haven't had 100% success with the latter approach, but jerry-rigging PostCSS into an already jerry-rigged Less config for Next.js hasn't been the most straightforward thing to do.
I just updated the post. Thanks again :)
Hey, thanks for the heads-up! Somehow I haven't thought about the nesting capabilities of less... But yes that should work and would be way better than using another webpack plugin 😅
I'll try it on the weekend and might update the post accordingly