Skip to content

Change admin ui plugin from using IIFE to esm#717

Open
Mikearaya wants to merge 11 commits into
masterfrom
admin-ui-iife-esm
Open

Change admin ui plugin from using IIFE to esm#717
Mikearaya wants to merge 11 commits into
masterfrom
admin-ui-iife-esm

Conversation

@Mikearaya

Copy link
Copy Markdown
Contributor

No description provided.

@Mikearaya Mikearaya force-pushed the admin-ui-iife-esm branch from 8278c4c to 09e8221 Compare July 6, 2026 16:36
@Mikearaya Mikearaya requested a review from pozylon July 7, 2026 10:11
@Mikearaya

Copy link
Copy Markdown
Contributor Author

Also added a sortOrder to nav items so that the plugin-injected side navigation items can be displayed anywhere in the side nav

@Mikearaya Mikearaya removed the request for review from pozylon July 7, 2026 15:36
@Mikearaya Mikearaya marked this pull request as draft July 7, 2026 15:36
@Mikearaya Mikearaya force-pushed the admin-ui-iife-esm branch from 587599f to 339cd14 Compare July 7, 2026 20:31
@Mikearaya Mikearaya marked this pull request as ready for review July 7, 2026 20:31
Comment thread packages/api/src/express/index.ts Dismissed
@Mikearaya Mikearaya requested a review from pozylon July 8, 2026 09:37
@Mikearaya

Mikearaya commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@pozylon I changed my mind on this.

Earlier, I was leaning toward the IIFE approach because it was simpler, and ESM kept running into issues I couldn't explain. But after digging deeper, those turned out to be a Next.js build/dev cache bug that affects the IIFE branch too. ESM was never the real issue.
What really changed my mind is the long-term maintenance. IIFE relies on manually keeping export lists in sync, which is easy to forget and only fails at runtime. ESM handles all of that automatically, and plugins can share the host's SDK instead of bundling their own copy.

IIFE is simpler to get started with, but I think ESM is simpler to live with. The migration is already done, please review and merge :)

@Mikearaya Mikearaya force-pushed the admin-ui-iife-esm branch from 21c122b to 20908ef Compare July 8, 2026 20:51
@Mikearaya Mikearaya force-pushed the admin-ui-iife-esm branch from 20908ef to d78021b Compare July 8, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants