Skip to content

feat: tsup build alignment and local setup fixes#4460

Merged
ScriptedAlchemy merged 74 commits intomainfrom
feat/tsup
Feb 28, 2026
Merged

feat: tsup build alignment and local setup fixes#4460
ScriptedAlchemy merged 74 commits intomainfrom
feat/tsup

Conversation

@ScriptedAlchemy
Copy link
Copy Markdown
Member

@ScriptedAlchemy ScriptedAlchemy commented Feb 18, 2026

Summary

  • align tsup package build configs to use unbundled outputs where applicable
  • ensure module federation packages are treated as external in tsup package configs
  • improve local CI portability by adding a macOS-safe CPU core detection fallback
  • fix codex setup script for worktree installs when no extra install args are passed

Validation

  • pnpm run ci:local --only=build-and-test (in progress previously; build stages validated)
  • npx nx run-many --targets=build --projects=error-codes,runtime,runtime-core,runtime-tools,inject-external-runtime-core-plugin,webpack-bundler-runtime,sdk --parallel=3 --skip-nx-cache
  • ./scripts/codex-setup.sh -- --frozen-lockfile

Single-PR Review Guide (No Additional PRs)

This PR will remain a single PR. Improvements are being done in-place (no stacked or follow-up PR splitting).

Suggested Review Order

  1. Core behavior/runtime changes first.
  2. Build/tooling and workflow updates second.
  3. Docs/examples/app fixtures last.

In-Place Scope Trim Checklist

  • Remove unrelated churn not required for this PR goal.
  • Keep lockfile and generated changes only when strictly needed.
  • Confirm acceptance criteria and regression tests are explicit in this PR.
  • Resolve merge conflict status and required CI checks before final re-review.

cursoragent and others added 29 commits February 17, 2026 20:44
Co-authored-by: zackary.l.jackson <zackary.l.jackson@gmail.com>
Use tsdown with nx run-commands for migrated packages and align export and type outputs for publint.
Remove legacy rollup configs and add shared migration scaffolding.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align package build metadata with tsdown output and type extension updates.
Remove CJS fallback from ESM runtime alias resolution for consistent module format selection.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use .d.mts for import types so exports match emitted ESM declaration files.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 18, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit e7a8632
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69a237af30b64c0008b4ba94
😎 Deploy Preview https://deploy-preview-4460--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

const runtimePath = path.resolve(__dirname, './plugin.esm.js');
const runtimePluginCandidates =
process.env.IS_ESM_BUILD === 'true'
? ['../plugin.js', '../plugin.cjs']
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have to do this id we have esm and cjs already why cant paths just be corerct? isnt this both cjs and esm build output?


// Keep legacy dist entry names as fallbacks for mixed plugin/runtime versions.
// Resolve package root last to avoid accidentally selecting a CJS export when
// an explicit ESM fallback file exists in legacy runtime layouts.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instad of checking based on bnudler conditions, since this package uses tsdown and it ahs define for its esm and cjs build outputs, cant we use that to conditionally proces.env.SI_ESM_BUILD to set the assets for the esm version aand cjs version fo the libary build outpus instead?

@ScriptedAlchemy ScriptedAlchemy mentioned this pull request Feb 28, 2026
5 tasks
@ScriptedAlchemy ScriptedAlchemy merged commit 918294f into main Feb 28, 2026
29 of 41 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the feat/tsup branch February 28, 2026 06:47
@2heal1 2heal1 mentioned this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants