Skip to content

Need help! Create alias for entrypoints path #575

@vinesh20

Description

@vinesh20

Thanks for the wonderful library!

Is there a way to create alias path in entrypoints?

Let me explain the scenario.

Library code structure:

-src
  - components
     - Button
     -  Dropdown

If I add the following entrypoints and run npm run fix, it is creating folders with package.json in the root in this structure

- components
  - Button
     - package.json
  - Dropdown
    - package.json
- src

for this below configuration

"preconstruct": {
    "entrypoints": [
      "index.tsx",     
      "components/Button/index.tsx",
      "components/Dropdown/index.tsx"      
    ]
  }

Is there way to setup the entry points to generate folders in root without components folder name? So that team consuming the library can access the components as import { Button } from '@ABC/Core/Button

Expected folder structure:

- Button
  - package.json
- Dropdown
   - package.json
- src
  - components

Please help in defining entrypoints to get the expected folder structure.

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