-
Notifications
You must be signed in to change notification settings - Fork 71
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
Declaration files cannot be found when consuming nested input files #207
Comments
Check if types are in the correct location in output and that any internal paths are correct. Maybe you are hitting #204? Although that one is for source maps. |
Is there anyway to dump all of the d.ts files into one dir instead of recreating the project folder structure? |
Dropping them into a flat file structure is not feasible because they might have name conflicts, also typescript generates internal imports based on file structure... You could merge them into a single file. There are some tools that can take d.ts and merge them, or you could run tsc explicitly and use bundling options. |
If I'm understanding this correctly, this is occurring because with multi-entry, Rollup outputs all the bundles into the same directory. Whereas rpt2 generates with the TS API which follows the input directory structure (not output directory structure). So A few different workarounds I could see for this:
I'm not sure if there's a clean solution that can be implemented within rpt2 for this since TS isn't aware of this output structure. There might be though by playing around with some options; likely high complexity to solve if possible. |
This seems to be a duplicate of #136 actually, which has a pretty big thread of workarounds. Closing as duplicate -- can continue discussions there. |
Hi, my rollup config looks like this:
When consuming my package, importing components with the following syntax works fine:
import { Button } from '@mycomponents'
I have added multiple inputs for people to consume just the component they want. I have noticed that when consuming, this is working for all of my components except the nested ones. (eg all the inputs live in a folder called FormControls)
Works:
import { Button } from '@mycomponents/lib/Button'
Doesn't work:
import { TextInput } from '@mycomponents/lib/TextInput'
Is there a recommended way to do this?
The text was updated successfully, but these errors were encountered: