Skip to content

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

@cawfeecoder

Description

@cawfeecoder

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions