Skip to content

ref(nuxt): Build the Nuxt module in-house instead of @nuxt/module-builder - #22190

Merged
logaretm merged 1 commit into
developfrom
awad/nuxt-inhouse-build
Jul 13, 2026
Merged

ref(nuxt): Build the Nuxt module in-house instead of @nuxt/module-builder#22190
logaretm merged 1 commit into
developfrom
awad/nuxt-inhouse-build

Conversation

@logaretm

@logaretmlogaretm commented Jul 10, 2026

Copy link
Copy Markdown
Member

Replaces @nuxt/module-builder with a plain rollup + tsc setup for the build/module output. Rollup bundles the module entry and emits the runtime files one-to-one (preserveModules), tsc emits the declarations, and a small script writes module.cjs, module.json and types.d.ts.

The point is to drop a build tool that consumes the TypeScript compiler API, so the package no longer pins us to a specific TS compiler, also streamlines nuxt SDK build step for future changes like rolldown.

We still have E2E tests ensuring the module output is consumable by Nuxt apps, so that's not something I would worry about drifting in the future.

Stacked on #22186.

@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from 00fe4d9 to 102eb9cCompareJuly 10, 2026 18:49
@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from 102eb9c to 10e5434CompareJuly 10, 2026 18:56
@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from 10e5434 to b48cbc7CompareJuly 10, 2026 19:00
@github-actions

github-actionsBot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

PathSize% ChangeChange
@sentry/browser27.6 kB--
@sentry/browser - with treeshaking flags26.04 kB--
@sentry/browser (incl. Tracing)46.35 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.14 kB--
@sentry/browser (incl. Tracing, Profiling)51.13 kB--
@sentry/browser (incl. Tracing, Replay)85.62 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags75.26 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)90.33 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)102.99 kB--
@sentry/browser (incl. Feedback)44.78 kB--
@sentry/browser (incl. sendFeedback)32.4 kB--
@sentry/browser (incl. FeedbackAsync)37.53 kB--
@sentry/browser (incl. Metrics)28.68 kB--
@sentry/browser (incl. Logs)28.93 kB--
@sentry/browser (incl. Metrics & Logs)29.61 kB--
@sentry/react29.39 kB--
@sentry/react (incl. Tracing)48.62 kB--
@sentry/vue33.03 kB--
@sentry/vue (incl. Tracing)48.33 kB--
@sentry/svelte27.63 kB--
CDN Bundle30 kB--
CDN Bundle (incl. Tracing)48.33 kB--
CDN Bundle (incl. Logs, Metrics)31.58 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.65 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.82 kB--
CDN Bundle (incl. Tracing, Replay)85.84 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)87.16 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.64 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.92 kB--
CDN Bundle - uncompressed89.33 kB--
CDN Bundle (incl. Tracing) - uncompressed146.07 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed94.03 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed150.05 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.76 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.28 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.24 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed278.98 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed282.93 kB--
@sentry/nextjs (client)51.17 kB--
@sentry/sveltekit (client)46.8 kB--
@sentry/core/server78.42 kB--
@sentry/core/browser64.77 kB--
@sentry/node-core62.72 kB-0.01%-2 B 🔽
@sentry/node125.41 kB--
@sentry/node (incl. diagnostics channel injection)139.66 kB--
@sentry/node/import (ESM hook with diagnostics-channel injection)69.96 kB--
@sentry/node/light50.73 kB-0.01%-1 B 🔽
@sentry/node - without tracing74.1 kB-0.01%-2 B 🔽
@sentry/aws-serverless83.32 kB+0.01%+1 B 🔺
@sentry/cloudflare (withSentry) - minified181.58 kB--
@sentry/cloudflare (withSentry)449.49 kB--

View base workflow run

@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from b48cbc7 to 18271b3CompareJuly 11, 2026 00:56
@logaretm
logaretm marked this pull request as ready for review July 11, 2026 02:32
@logaretm
logaretm requested a review from a team as a code ownerJuly 11, 2026 02:32
@logaretm
logaretm requested review from chargome, mydea and nicohrubec and removed request for a teamJuly 11, 2026 02:32
@nicohrubec
nicohrubec requested a review from s1gr1dJuly 11, 2026 07:51
Comment on lines +6 to +7
// - `module.cjs`: a CJS shim. It can't statically require the ESM-only `@nuxt/kit`,
// so it lazily imports the ESM entry instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can remove the .cjs shim as they also made the module builder ESM-only in v1: https://github.com/nuxt/module-builder/releases/tag/v1.0.0

Apparently, this was only needed for Nuxt 2

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

That's nice, I cleaned that up. thanks!

Base automatically changed from awad/migrate-ts-node-to-tsx to developJuly 13, 2026 14:09
@logaretm
logaretm requested review from a team as code ownersJuly 13, 2026 14:09
@logaretm
logaretm requested review from JPeer264, Lms24, isaacs and msonnb and removed request for a teamJuly 13, 2026 14:09
@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from 18271b3 to 24b41c9CompareJuly 13, 2026 14:09
…lder
Replace @nuxt/module-builder with a plain rollup + tsc setup for the
build/module output: rollup bundles the module entry and emits the
runtime files one-to-one (preserveModules), tsc emits the declarations,
and a small script writes module.cjs, module.json and types.d.ts. This
drops a build tool that consumes the TypeScript compiler API, so the
package no longer pins us to a specific compiler.
@logaretm
logaretmforce-pushed the awad/nuxt-inhouse-build branch from 24b41c9 to 3131d3eCompareJuly 13, 2026 14:31
@logaretm
logaretm merged commit 2d3fc43 into developJul 13, 2026
599 of 606 checks passed
@logaretm
logaretm deleted the awad/nuxt-inhouse-build branch July 13, 2026 15:16
Sign up for freeto 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

@logaretm@s1gr1d