This PR refactors the way we bundle CSS again, but this really should be the last time 🤞
It replaces the esbuild-css-modules-plugin with a much smaller and simpler solution: the new plugin uses esbuild itself to bundle the CSS and then returns it as a string using the built-in text loader, which means it gets inlined during the main build.
Aside from less dependencies and less complexity, this also has the advantage that the CSS is now minified, which reduces the bundle size (granted not by a lot as we don’t have a lot of CSS but, still).
This PR refactors the way we bundle CSS again, but this really should be the last time 🤞
It replaces the
esbuild-css-modules-plugin
with a much smaller and simpler solution: the new plugin uses esbuild itself to bundle the CSS and then returns it as a string using the built-intext
loader, which means it gets inlined during the main build.Aside from less dependencies and less complexity, this also has the advantage that the CSS is now minified, which reduces the bundle size (granted not by a lot as we don’t have a lot of CSS but, still).