[Feature]: Allow custom esbuild-Plugins through remix.config.js
See original GitHub issueWhat is the new or updated feature that you are suggesting?
Allow us to add esbuild-Plugins through the remix.config.js so we can bundle our for Example CSS with PostCSS, SASS or more. I know it was already suggested in #192 and “declined” because the Team isn’t comfortable with locking into esbuild.
I understand that but would like to propose a different Idea for the time being: allow us to set a new Key like dangerouslySetEsbuildPlugins so we can add esbuild-Plugins.
Why should this feature be included?
So we can bundle our CSS in our Way without the need to setup another CLI Process (which isn’t Hard I agree but could be avoided with a single Key for us to use). And we could use the Folder Structure like it was intended and don’t have another styles-Folder in a different Location.
This would of course just be a temporary “fix” until a better Solution for processing CSS is found which will officially be supported by Remix. Since it’s named dangerouslySetEsbuildPlugins (or something else) it could be documented as just a Way for now and that it will be removed in a later Update.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:49
- Comments:5 (1 by maintainers)

Top Related StackOverflow Question
I found a way to do this, though the standard caveats apply (shameful hack, unsupported, subject to break in the future, etc., etc.) 😄 … If you create an
esbuild-overrides.jslike so:Then change your
build/devscripts in package.json to load it before invoking remix:I’d also like to see support for
esbuildplugins as that will (hopefully) allow us to use LinariaCSS in a Remix project. If you’re not familiar with it, Linaria is a zero-runtime CSS-in-JS library that compiles your styles into static CSS files at build time, offering a great mix of DX and runtime performance.Some of its (cherry-picked) benefits are:
Basically, we get to write something like the following but still have all the benefits of serving plain CSS that needs no runtime JS: