Skip to content

feat(sandbox): expose standalone sandbox controller#3161

Merged
kuitos merged 3 commits into
nextfrom
rfc/standalone-sandbox-runtime
Jul 18, 2026
Merged

feat(sandbox): expose standalone sandbox controller#3161
kuitos merged 3 commits into
nextfrom
rfc/standalone-sandbox-runtime

Conversation

@kuitos

@kuitos kuitos commented Jul 18, 2026

Copy link
Copy Markdown
Member

Stack

4 / 5. Depends on #3160.

Review scope

  • Define the standalone sandbox contract in the RFC.
  • Export the standalone sandbox controller from @qiankunjs/sandbox.
  • Cover lifecycle, execution, module loading, DOM patching, cleanup, and package publication behavior.

Out of scope

  • End-user guides, runnable browser example, and CSP e2e acceptance (final PR).

Validation

  • Sandbox tests: 60 passed at this layer.
  • qiankun loadApp tests: 6 passed at this layer.
  • pnpm run build:packages passed.
  • Sandbox package pnpm pack --dry-run passed.

@kuitos
kuitos force-pushed the rfc/standalone-sandbox-runtime branch from 19726a9 to 8167242 Compare July 18, 2026 15:43
- The JS-only preset no longer mutates an element passed to mount():
  data-name and <qiankun-head> preparation belong to the container-backed
  preset only, in both the mount path and the controller nodeTransformer.
- Drop the redundant head-ensure call in the dynamicAppend plugin mount:
  it discarded the returned cleanup, so a head created there could never
  be released. Head auto-creation is owned solely by createSandbox mount,
  whose cleanups are tracked and freed on dispose.
- Replace the qiankun-head string literal with the qiankunHeadTagName
  constant, throw QiankunError instead of TypeError for the
  styleIsolation-without-container misconfiguration, and restore the
  styleIsolation JSDoc lost when SandboxConfiguration became a Pick of
  CreateSandboxOptions.
@kuitos
kuitos merged commit 8bec431 into next Jul 18, 2026
7 checks passed
@kuitos
kuitos deleted the rfc/standalone-sandbox-runtime branch July 18, 2026 16:09
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.

1 participant