Provide a way to define build time global variables like webpack define plugin #3932
Replies: 4 comments 7 replies
-
There’s no way to customize the compiler, you can run your own script before and after Remix build manually thought |
Beta Was this translation helpful? Give feedback.
-
I am running into this as well (for Sentry too). I've ended up patching @remix-run/dev to allow custom "define" values in the remix config to be replaced in the browser build. Doing this in a custom script is doable but becomes cumbersome when running the dev server. |
Beta Was this translation helpful? Give feedback.
-
Have changed this from Q&A to proposal |
Beta Was this translation helpful? Give feedback.
-
Any improvements on this proposal? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any alternative / equivalent way of defining build time global variable during build like we can do with webpack define plugin ?
Use case:
I have to pass version information (which is only available during build time) to the application for usage with
Sentry.init
Beta Was this translation helpful? Give feedback.
All reactions