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
The Admin UI is no longer launched on [v1.20.11], this is because this bug I've introduced, sorry 🙌🏼 was missing another fix on the "loadConfig" function
Try to launch the app server with the @medusajs/admin plugin enabled
Nothing happens
Expected behavior
We should allow a fully configurable serve
Code snippets
I've found a solution, which would explain the logic expressed in the documentation
Instead of doing this :
// packages/admin/src/utils/load-config.ts// ... for reading purposeif(isDev){config={
...config,serve: false,// ℹ️ This is problematicpath: "/",backend: "http://localhost:9000",}}
We should do this :
// packages/admin/src/utils/load-config.ts// ... for reading purposeif(isDev){config={
...config,// ✅ We remove the `serve` set to `false` on development modepath: "/",backend: "http://localhost:9000",}}
The same goes with the logic a few lines below that one.
// packages/admin/src/utils/load-config.ts// ...if(typeofplugin!=="string"){constoptions=(pluginas{options: PluginOptions}).options??{}config={serve: isDev ? false : options.serve??config.serve,// ℹ️ We also force to `false` here// ...
#11238)
## Related to #11237
## Solution that PR introduce
- `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 v1.20.11 where the Admin UI cannot be launched at all
## Quick preview of the new behavior on a project
In this preview, I try with the different values and how it behaves with the fix.
- No `serve` option -> Default to `true`; Trigger the admin develop
- `serve` set to `false` -> Ignore the admin develop command
- `serve` set to `true` -> Trigger the admin develop
https://github.com/user-attachments/assets/33fdb428-b3ae-466a-9095-b7f8ba0dd822
Co-authored-by: Kasper Fabricius Kristensen <[email protected]>
Bug report
The Admin UI is no longer launched on 1.20.11
Describe the bug
The Admin UI is no longer launched on [v1.20.11], this is because this bug I've introduced, sorry 🙌🏼 was missing another fix on the "loadConfig" function
System information
Medusa version (including plugins): v1.20.11
Steps to reproduce the behavior
Expected behavior
We should allow a fully configurable
serve
Code snippets
I've found a solution, which would explain the logic expressed in the documentation
Instead of doing this :
We should do this :
The same goes with the logic a few lines below that one.
But this should be better :
Additional context
I've already implemented the solution on a PR that you can find "here"
The text was updated successfully, but these errors were encountered: