Open robertovg opened 3 years ago
Any updates on thishere?
Would also love to know more about this. Have tried changing the entry
and name
parameters in the build command, but it's all still exported as index.js
+1
I wanted to achieve the same thing ang I think I got it working with tsdx, rollup config override based on the linked stackoverflow threads and some extra bash scripts. The submodule is only in the esm though, so this still is not ideal. In our case moving towards monorepo with multiple separate packages will probably work better.
You can check out the PR here: https://github.com/VirtusLab/formts/pull/83
Current Behavior
We are building shared-code projects with tsdx, and we only have one doubt, concern we can't get an answer. How to export subfolders for packages published with TSDX.
Let's use my previous example for the question. In the entry point of our project, we export those two components in the root.
And because of that, when you want to use them we have to import the components from the root of our library (usage example):
We would like to know how to configure our entry point(s) so we can import our components from subfolders like
Expected behavior/Suggested solution(s)
To have a guide/notes on how to add subfolders to the libraries we create, so it's easy (not only for me but for anyone using TSDX) how to create libraries with subfolders.
Additional context
tsdx.config.js
would be great.Your environment
Example project:
https://github.com/robertovg/tsdx-styled-components/ https://github.com/robertovg/next-ts-styled-components-tsdx-host