Skip to content
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

ESM: Support for Subpath patterns #6147

Closed
barelyhuman opened this issue Sep 18, 2021 · 4 comments · Fixed by #6148
Closed

ESM: Support for Subpath patterns #6147

barelyhuman opened this issue Sep 18, 2021 · 4 comments · Fixed by #6148
Labels
🎒 Bundler Refers to CodeSandbox's In-Browser Bundler ✨ Feature Indicates that this adds a new feature.

Comments

@barelyhuman
Copy link

🌈 Feature

Ability to handle subpath patterns

What is this feature?

A few libraries with a lot of exports would prefer to use the above pattern while creating exports and this current breaks in CSB example sandbox https://codesandbox.io/s/kind-payne-i2eb3?file=/src/App.tsx for https://github.com/pmndrs/jotai

The feature or maybe even a bug would be to add resolution handlers for the exports field to have glob patterns and absolute file paths.

How the feature should work?

The feature or maybe even a bug would be to add resolution handlers for the exports field to have glob patterns and absolute file paths.

You have examples or an idea how it can be implemented?

You can follow the node docs https://nodejs.org/api/packages.html#packages_subpath_patterns , as this was added to both v12 and v14 and already supported by v16

I wouldn't mind raising a PR but I was unable to find the point of generation for packages. I'm assuming it's the sandpack package code but I'm not sure

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Sep 18, 2021

We added support for this yesterday, but rolled it back due to issues, #6065 will look into this again next week at the earliest as we really want to ensure everything works perfectly

@DeMoorJasper DeMoorJasper added ✨ Feature Indicates that this adds a new feature. 🎒 Bundler Refers to CodeSandbox's In-Browser Bundler labels Sep 18, 2021
@barelyhuman
Copy link
Author

We added support for this yesterday, but rolled it back due to issues, #6065 will look into this again next week at the earliest as we really want to ensure everything works perfectly

@DeMoorJasper That makes sense, thanks

@vinothvk
Copy link

vinothvk commented Nov 8, 2021

@DeMoorJasper any timeline when this is planned to be resolved ? thanks

@DeMoorJasper
Copy link
Member

@vinothvk Shifted my focus to other projects within codesandbox for now, hoping to get to this by next week.

Sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎒 Bundler Refers to CodeSandbox's In-Browser Bundler ✨ Feature Indicates that this adds a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants