Skip to content

fix(config): load nuxt.config.ts natively, not via jiti - #590

Merged
harlan-zw merged 1 commit into
mainfrom
fix/issue-588
Oct 9, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
fix/issue-588

Conversation

@harlan-github-agent

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Closes #588

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Every CI install and deploy run paid a jiti fallback during pnpm dev:prepare, because nuxt.config.ts and two local modules import TS files without extensions, which Node's native loader cannot resolve:

WARN [NUXT_B5023] The config file .../nuxt.config.ts was loaded through jiti because the runtime could not load it: Cannot find module .../layers/marketing/app/utils/agent-pages
WARN [NUXT_B8023] The module .../modules/file-icons/module was loaded through jiti because the runtime could not load it: Cannot find module .../shared/file-icons
WARN [NUXT_B8023] The module .../modules/og-static-fonts/module was loaded through jiti because the runtime could not load it: Cannot find module .../modules/og-static-fonts/sync

Every extensionless relative TS import now carries .ts, matching the precedent already in layers/marketing/content.config.ts. Extensions alone were not enough: the ./package.json import also needs with { type: 'json' } before Node loads the config natively, so that attribute is part of the change. The issue's proving command went from 3 to 0:

$ pnpm dev:prepare 2>&1 | grep -cE 'NUXT_B(5023|8023)'
0

One thing a reviewer should know: typechecking .nuxt/tsconfig.node.json directly (no CI job runs it) shows TS2835s in checks/external/* that predate this change, and it now also pulls shared/server/session-access.ts into that project's stricter nodenext context, where the nitro auto-import getUserSession is undeclared. Left alone on purpose: that project already failed at base with 15 errors, and CI typechecks these files in their own projects, where nothing changed.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 9, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-09 02:48 UTC.

GitHub merged this pull request.

No material findings were recorded.

0a3de203-3bf6-4726-ab0b-5c852e1cb6b7

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 9, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit b1bec81 into main Oct 9, 2026
8 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Oct 9, 2026
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.

Extensionless TS imports force jiti fallback in Nuxt prepare

1 participant