css-modules-require-hook is just a good example of a node-loader. Like - you may process source CSS and transform to the thing you need, like you may do using webpack-loader.
Almost nobody consider this as an option, or calling some loader-based approaches bad, cos they are not repeatable for node, while they are :)
What about babel-plugin-transform-postcss? I think this is better than css-modules-require-hook, because postcss and postcss-modules are used directly. And no CSS is actually included in the resulting JavaScript
css-modules-require-hook
is just a good example of anode-loader
. Like - you may process source CSS and transform to the thing you need, like you may do usingwebpack-loader
.Almost nobody consider this as an option, or calling some loader-based approaches bad, cos they are not repeatable for node, while they are :)
What about babel-plugin-transform-postcss? I think this is better than css-modules-require-hook, because postcss and postcss-modules are used directly. And no CSS is actually included in the resulting JavaScript
A very good option