-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(admin): loadConfig does not allow serve
to be truly configurable
#11238
fix(admin): loadConfig does not allow serve
to be truly configurable
#11238
Conversation
- `serve` is always `true` allowing to always start the Admin UI with the new logic in the `develop.js` command file in @medusajs/medusa - `loadConfig` in the @medusajs/admin is no longer overriding the `serve` function to false, allowing to fix the current bug we have in 1.20.11 where the Admin UI cannot be launched at all
🦋 Changeset detectedLatest commit: d42c10e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Someone is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
@@ -35,7 +35,6 @@ export const loadConfig = (isDev?: boolean): PluginOptions | null => { | |||
if (isDev) { | |||
config = { | |||
...config, | |||
serve: false, |
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.
We remove the forced false
value here to make sure it's configurable as explained in the docs
@@ -45,7 +44,7 @@ export const loadConfig = (isDev?: boolean): PluginOptions | null => { | |||
const options = (plugin as { options: PluginOptions }).options ?? {} | |||
|
|||
config = { | |||
serve: isDev ? false : options.serve ?? config.serve, | |||
serve: options.serve ?? config.serve, |
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.
Same goes here, to make sure it's fully configurable
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.
Thanks @adevinwild LGTM
Related to #11237
Solution that PR introduce
serve
is alwaystrue
allowing to always start the Admin UI with the new logic in thedevelop.js
command file in@medusajs/medusa
loadConfig
in the@medusajs/admin
is no longer overriding theserve
function to false, allowing to fix the current bug we have in v1.20.11 where the Admin UI cannot be launched at allQuick preview of the new behavior on a project
In this preview, I try with the different values and how it behaves with the fix.
serve
option -> Default totrue
; Trigger the admin developserve
set tofalse
-> Ignore the admin develop commandserve
set totrue
-> Trigger the admin developloadConfig.mp4