[loader] Pilot first-party dual ESM/CJS plugin builds #8

Open
opened 2026-06-02 08:21:14 +00:00 by steve · 0 comments
Owner

Source: Lapis plugin module loading plan, 2026-06-02.

Goal: prove the official plugin build and release path can publish ESM-first bundles with CommonJS fallback where useful.

Scope:

  • Update first-party plugin build templates to emit main.mjs and main.js where appropriate.
  • Require single-file ESM bundles for the early rollout; allow chunks only after asset server stability.
  • Add lapis.runtime.entries.workspace metadata with format, fallbackPath, sharedDependencies, and reload requirements.
  • Add bundle external validation for generated public host modules.
  • Start with a small pilot plugin before migrating larger plugins such as Docs.

Acceptance:

  • Pilot official plugin loads as ESM.
  • The same plugin loads via CommonJS fallback when ESM is disabled in tests.
  • Release metadata declares both formats and shared dependencies.
Source: Lapis plugin module loading plan, 2026-06-02. Goal: prove the official plugin build and release path can publish ESM-first bundles with CommonJS fallback where useful. Scope: - Update first-party plugin build templates to emit main.mjs and main.js where appropriate. - Require single-file ESM bundles for the early rollout; allow chunks only after asset server stability. - Add lapis.runtime.entries.workspace metadata with format, fallbackPath, sharedDependencies, and reload requirements. - Add bundle external validation for generated public host modules. - Start with a small pilot plugin before migrating larger plugins such as Docs. Acceptance: - Pilot official plugin loads as ESM. - The same plugin loads via CommonJS fallback when ESM is disabled in tests. - Release metadata declares both formats and shared dependencies.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/plugin-registry#8
No description provided.