Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix dotted code imports before asset fallback#160

Open
hvp17 wants to merge 1 commit into
vercel:main from
hvp17:fix/resolve-dotted-code-imports
Open

Fix dotted code imports before asset fallback #160
hvp17 wants to merge 1 commit into
vercel:main from
hvp17:fix/resolve-dotted-code-imports

Conversation

@hvp17

@hvp17 hvp17 commented Jun 21, 2026

Copy link
Copy Markdown

Description

Fixes #133.

Authored asset imports currently claim relative specifiers with dotted basenames before the normal code resolver can append TypeScript/JavaScript extensions. That makes code imports like ./Reflect.getPrototypeOf and ../helpers/mock-registry.schemas fail as missing assets even when matching .js or .ts files exist.

This changes the asset import plugin to check for an adjacent authored code file with Eve's normal resolver extensions before falling back to asset handling. It also adds a scenario regression for both a CommonJS dotted-basename require and a local TypeScript dotted-basename import.

How did you test your changes?

  • pnpm exec vitest run --config vitest.scenario.config.ts src/internal/authored-module-loader.scenario.test.ts
  • pnpm --filter eve run typecheck
  • pnpm exec oxfmt -- packages/eve/src/internal/authored-asset-import-plugin.ts packages/eve/src/internal/authored-module-loader.scenario.test.ts .changeset/dotted-code-imports.md
  • git diff --check

Note: the local machine is running Node v22.22.3, while Eve requires Node >=24, so the pnpm commands emit engine warnings. The focused scenario regression and package typecheck pass.

PR Checklist

  • I ran the relevant checks from CONTRIBUTING.md
  • I added tests and documentation where relevant
  • I added a changeset if this touches the published eve package
  • DCO sign-off passes for every commit (git commit --signoff)

Signed-off-by: Tomas Gadliauskas <troliukass@gmail.com>

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

@hvp17 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@hvp17 hvp17 marked this pull request as ready for review June 21, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

eve dev bundler fails to resolve relative imports whose basename contains a dot (e.g. ./Reflect.getPrototypeOf, ./lodash.merge)

1 participant

AltStyle によって変換されたページ (->オリジナル) /