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

Feature: Allow exports to use sub-folder as a name #3

Open
cawfeecoder opened this issue Nov 25, 2021 · 1 comment · May be fixed by #4
Open

Feature: Allow exports to use sub-folder as a name #3

cawfeecoder opened this issue Nov 25, 2021 · 1 comment · May be fixed by #4

Comments

@cawfeecoder
Copy link

Description

When using the --exports flag, I would like the sub-folder to name the export as opposed to the filename

For example, I have the following structure:

.
├── src              
├────  button
├──────  index.js

Currently, using the --exports flag will name one of the exports as index instead of button. It would be nice if the index.js is inside a sub-folder to be able to use that as the name so the generated exports in package.json appear as:

"exports": {
   "./button": "./dist/button/index.js"
}

vs

"exports": {
  "./index": "./dist/button/index.js"
}
@cawfeecoder cawfeecoder linked a pull request Nov 25, 2021 that will close this issue
@UpperCod
Copy link
Member

I like the idea, let's complete the PR to perform the merge

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 a pull request may close this issue.

2 participants