-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(remix-dev/vite): clean resolved Remix config #8586
refactor(remix-dev/vite): clean resolved Remix config #8586
Conversation
|
packages/remix-dev/vite/plugin.ts
Outdated
export let getServerBuildRootDirectory = (buildContext: BuildContext) => | ||
getServerBuildDirectory(buildContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export let getServerBuildRootDirectory = (buildContext: BuildContext) => | |
getServerBuildDirectory(buildContext); | |
export let getServerBuildRootDirectory = getServerBuildDirectory; |
Though at that point, might be worth just exporting getServerBuildDirectory
directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, I missed this!
@@ -218,6 +211,13 @@ type BuildContext = | |||
serverBundleId: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this is string | undefined
instead of ?: string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that you're forced to add the key to the object, even if the value is undefined.
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
This is a follow-up to #8582, in preparation to expose the resolved Remix config as public API (e.g. via the adapter buildEnd hook).
The only remaining properties on the resolved
remixConfig
object that aren't present in the user-facing config type arerootDirectory
,entryClientFilePath
andentryServerFilePath
. These have now been moved to thebuildContext
object. Since a lot of code assumes these are onremixConfig
, it required a bit of a refactor to accomodate this.