Replies: 1 comment
-
After lots of trial and error this is what worked for me (using Vite): 1. Update tsconfig so IDEs can track imports in your project and don't forget to use .tsx for React components!
2. Update Vite config to have multiple exports - I had to name them as otherwise Nx churned out index.js, index2.js etc. and it became cumbersome to know which number matches which export.
3. Update package.json to reference the exported entries - they all get chucked into the same dist directory, so no need to try and keep the path the same as in your actual library folder.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After
nx run build
I can do import {Abacus} from "@my-style/ui-icons"but I want to import Abacus from "@my-style/ui-icons/Abacus"
How to do it?
This is
libs/ui/icons/src/index.ts
This is
libs/ui/icons/src/index.ts
This is
libs/ui/icons/project.json
This is
tsconfig.base.json
Beta Was this translation helpful? Give feedback.
All reactions