Skip to content

fix(nuxt): generate nuxt module builder layout#13

Merged
antfu merged 2 commits into
devframes:mainfrom
userquin:fix-nuxt-module-types
May 14, 2026
Merged

fix(nuxt): generate nuxt module builder layout#13
antfu merged 2 commits into
devframes:mainfrom
userquin:fix-nuxt-module-types

Conversation

@userquin
Copy link
Copy Markdown
Contributor

@userquin userquin commented May 13, 2026

Following with #9, this PR includes:

  • use @devframes/nuxt at nuxt module meta (renamed from devframe)
  • rename nuxt module to module.ts
  • generate dist/types.d.mts
  • generate dist/module.json: includes the name, the version (from package.json) and the tsdown for the builder entry (getting tsdown version from package.json devDependencies)
  • export ModuleOptions and DevframeNuxtModuleOptions and use ModuleOptions at defineNuxtModule: export type ModuleOptions = DevframeNuxtModuleOptions
  • remove exports: true from module build
  • change default subpackage export to use ./dist/types.d.mts for types and global types
  • hack useRuntimeConfig at nuxt.d.ts
  • change how we override baseURL
  • client plugin to use the new useRuntimeConfig module augmentation
  • updated tsnapi for module: tests/__snapshots__/tsnapi/@devframes/nuxt/index.snapshot.d.ts

NOTE: if we start adding some nuxt stuff in the module (module hooks...), maybe we'll need to switch to nuxt module builder.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit d93f9e7
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a04c79b0fb7c10007ee49fa
😎 Deploy Preview https://deploy-preview-13--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

"configKey": "devframe",
"version": "${version}",
"builder": {
"tsdown": "${devDependencies.tsdown}"
Copy link
Copy Markdown
Contributor Author

@userquin userquin May 13, 2026

Choose a reason for hiding this comment

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

maybe we should remove the ^ if present

Copy link
Copy Markdown
Contributor Author

@userquin userquin May 14, 2026

Choose a reason for hiding this comment

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

I need to review the version, maybe we need to load pnpm workspace and find the tsdown version in the correspoding catalog

@antfu antfu merged commit 1ce81d8 into devframes:main May 14, 2026
11 checks passed
@userquin userquin deleted the fix-nuxt-module-types branch May 14, 2026 12:24
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.

2 participants