Skip to content

build: migrate to @nuxt/module-builder v2 - #325

Merged
DamianGlowala merged 1 commit into
mainfrom
build/module-builder-v2
Nov 21, 2026
Merged

DamianGlowala merged 1 commit into
mainfrom
build/module-builder-v2

Conversation

@DamianGlowala

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

📚 Description

Updates to @nuxt/module-builder v2

Migrate to @nuxt/module-builder 2.0.0-alpha.1 following its upgrade
guide:

- Replace unbuild with tsdown, drop build.config.ts and add a
  tsdown.config.ts with the builder() plugin.
- Use source exports: exports and main point at src, with the dist
  paths in publishConfig. Fix the runtime subpath to the .js/.d.ts
  files the build emits, and drop typesVersions, as Nuxt 4 apps only
  read exports.
- Remove the stub build from dev:prepare, and run tsdown directly
  from build and prepack.
- Type check each part with vue-tsc -b, using tsconfig.module.json
  for module code and tsconfig.test.json for tests and config files.
- Enable isolatedDeclarations, with an explicit type on the module
  export and a type template for #build/nuxtjs-device.mjs.
@github-actions github-actions Bot added the 4.x label Nov 21, 2026
@DamianGlowala
DamianGlowala merged commit 66861d5 into main Nov 21, 2026
3 checks passed
@DamianGlowala
DamianGlowala deleted the build/module-builder-v2 branch November 21, 2026 13:30
@github-actions github-actions Bot mentioned this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant