Repository navigation
fix(db): import db lib by file so the module loads without jiti - #941
Merged
Merged
Conversation
|
@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
atinux
approved these changes
Oct 23, 2026
Co-authored-by: onmax <maximogarciamtnez@gmail.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1696b-6477-758d-8bac-4b909ef4ac47 Co-authored-by: Sébastien Chopin <atinux@gmail.com>
atinux
force-pushed
the
fix/db-lib-file-import
branch
from
October 23, 2026 15:56
9a6e806 to
68a1557
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #940
dist/module.mjsimports the directory./db/lib. Node can't load directory imports, so Nuxt falls back to jiti and, withcompatibilityVersion: 5, printsNUXT_B8023.@nuxt/module-builderonly rewrites./lib/...imports to the built file, not bare./lib, sosetup.tsnow imports./lib/index. The old string externals only silenced unbuild's implicit-dependency warning. A regex does the same for the new path, like module-builder's/dist[\\/]runtime[\\/]/.Repro: https://github.com/onmax/repros/tree/repro/nuxthub-940/nuxthub-940.
pnpm verifyfails with the packedmainbuild and passes with this branch.No test added: CI tests run against the
dev:preparestub, which loads through jiti either way.