You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now createApp is configured with a bunch of mostly paths needed in order to create an express app/middleware with the right mappings. It would be better to minimize the config provided to the createApp function.
Since all of the paths provided as config can be computed based on the remix.config.js, I would like to propose to have the createApp be able to accept it's path as input (plus process.env.NODE_ENV).
Why the path and not an object of the same type?
Because you can assume that the folder of the path being the root of your remix app. That would make any fixes related to configuration much easier and could be handled in one place. After all the motivation for this change came from #4135
I still like the object approach
In this case it would still be better to share the type import('@remix-run/dev').AppConfig since adding more string arguments to the createApp does not help with it's readability.
Dependencies
If such a solution is ok, @remix-run/serve would need also to share/reuse the code for "reading" the remix.config.js since the default config values should somehow still get computed
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Right now
createApp
is configured with a bunch of mostly paths needed in order to create an express app/middleware with the right mappings. It would be better to minimize the config provided to thecreateApp
function.Since all of the paths provided as config can be computed based on the
remix.config.js
, I would like to propose to have thecreateApp
be able to accept it's path as input (plusprocess.env.NODE_ENV
).Why the path and not an object of the same type?
Because you can assume that the folder of the path being the root of your remix app. That would make any fixes related to configuration much easier and could be handled in one place. After all the motivation for this change came from #4135
I still like the object approach
In this case it would still be better to share the type
import('@remix-run/dev').AppConfig
since adding more string arguments to thecreateApp
does not help with it's readability.Dependencies
If such a solution is ok,
@remix-run/serve
would need also to share/reuse the code for "reading" theremix.config.js
since the default config values should somehow still get computedBeta Was this translation helpful? Give feedback.
All reactions