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

Need help! Create alias for entrypoints path #575

Open
vinesh20 opened this issue Jul 27, 2023 · 0 comments
Open

Need help! Create alias for entrypoints path #575

vinesh20 opened this issue Jul 27, 2023 · 0 comments

Comments

@vinesh20
Copy link

vinesh20 commented Jul 27, 2023

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.

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

No branches or pull requests

1 participant