indooorsman / esbuild-css-modules-plugin

A esbuild plugin to bundle css modules into js(x)/ts(x)
MIT License
91 stars 16 forks source link

Combine with less / sass #31

Closed fragsalat closed 2 years ago

fragsalat commented 2 years ago

Hey there,

is there a way to make css modules work with less / scss? If not it would be awesome to have a hook for pre processing to let less or scss compile the content to css before the plugin is processing the classes.

indooorsman commented 2 years ago

this plugin will handle .module(s).css with file namespace (https://esbuild.github.io/plugins/#namespaces) , it will do nothing if some other plugin resolve these files to another namespace.

for pre/post hooks I have to think more.

another approach is to compile less/sass to normal css before esbuild