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

resolver: support package exports for root import (".") #2971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eldiablolives wants to merge 2 commits into AssemblyScript:main
base: main
Choose a base branch
Loading
from frogfishio:exports-resolver

Conversation

@eldiablolives
Copy link

@eldiablolives eldiablolives commented Dec 30, 2025

Closes or improves upon long-standing bare import limitations.
Allows libraries like @whatever/stuff to use standard "exports" mapping.
No breaking changes — full fallback to ascMain/assembly.

Add basic support for the "exports" field in package.json when resolving
bare package imports. Checks "exports["."]" first, then falls back to
existing ascMain and assembly/ behavior.
This enables modern package setups while preserving full compatibility.
Tested with --traceResolution on packages using "exports": { ".": ... }
Copy link
Member

@HerrCai0907 HerrCai0907 left a comment

Choose a reason for hiding this comment

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

I like this concept.
However, could it be possible to limit it under cli/index.js part? I think all module resolving logic is out of src scope.

As requested — keep core src/ logic unchanged, handle modern exports
only in CLI package loading path.
Copy link
Author

@HerrCai0907 Thank you for the feedback! I've moved all the package resolution logic to the CLI side only, keeping the core parser unchanged. The module resolving now happens exclusively in index.js during file loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@HerrCai0907 HerrCai0907 HerrCai0907 left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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