Replies: 2 comments 1 reply
-
This has been asked/suggested before, the Remix team has said they don’t want to expose the compiler or allow plugins right now, the first because that will let them change the internal compiler without causing a breaking change and the second because plugins can slow down your build process and most people will come to this repo asking why is slow instead realizing it’s a plug-in |
Beta Was this translation helpful? Give feedback.
-
I believe the main reason why this has not been added yet is because porting the same feature to different frameworks may turn out difficult. Once Remix comes to Svelte then it would probably be more reasonable since the additional experience would allow for more informed decisions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using a type of file that Remix doesn't support out of the box, the documentation always recommends to run a seperate compiler in parallel with the Remix CLI. For example, to use Sass, I need to run the Sass compiler to generate css files that Remix can actually import.
Then, the esbuild file loader appears to be used to get the file into the final build. To simplify the process, an option could be added to the Remix config that allows custom loaders to be specified.
This means, I could just import the sass file where I had previously imported the compiled CSS file and the loader would take care of compiling it. This hands off control of where the intermediate files are stored so I don't need to fiddle with .gitignore and makes it much more convenient to use. Also: Rollup's Why.
This could be implemented with a simple config option that internally composes an esbuild plugin. In comparison to just allowing users to poke around with the esbuild options, a minimal loader API solves a very real problem and only that.
Beta Was this translation helpful? Give feedback.
All reactions