Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Mar 11, 2025

This is only for demonstration.

I'll migrate to oxc-resolver instead in another PR.

cc @SukkaW

@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2025

⚠️ No Changeset found

Latest commit: 6dd37c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@JounQin JounQin marked this pull request as draft March 11, 2025 04:45
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 11, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@socket-security
Copy link

socket-security bot commented Mar 11, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@dual-bundle/import-meta-resolve@4.1.0 None 0 126 kB jounqin
npm/enhanced-resolve@5.17.15.16.0 None 0 210 kB evilebottnawi
npm/left-pad@1.3.0 None 0 9.75 kB stevemao
npm/path-serializer@0.3.4 eval 0 78.7 kB sooniter

View full report↗︎

@JounQin JounQin force-pushed the feat/import-meta-resolve branch from ceab0e0 to 192a31d Compare March 11, 2025 04:48
@JounQin JounQin force-pushed the feat/import-meta-resolve branch from 192a31d to 6dd37c3 Compare March 11, 2025 05:33
Comment on lines +26 to +36
if (path.isAbsolute(specifier)) {
for (const suffix of pathSuffixes) {
const filename = specifier + suffix

if (existsFile(filename)) {
return filename
}
}

return
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The path suffix part is way too complicated. Meanwhile enhanced-resolve and the oxc-resolver supports doing this internally.

@JounQin JounQin closed this in #237 Mar 14, 2025
@JounQin JounQin deleted the feat/import-meta-resolve branch March 14, 2025 09:33
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.

3 participants