-
Notifications
You must be signed in to change notification settings - Fork 12
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
v7.0.11 - Importing RCPCHChart from npm package no longer functions #107
Comments
Ah sorry @dmc-cambric yes it is possible things got moved around when I removed the fonts and css files. I changed the build folder name to This I guess is a breaking change which it was not meant to be so I can put it back the way it was. In the meantime changing |
Hi Simon, yeah the import for the RCPCHChart there is the same one that we use:
However I think there are some differences in our implementation, we're using the import within a typescript file, and it seems the typing is broken in some areas with the new npm package build. v7.0.9 build folder: v7.0.11 dist folder From what I can tell, a lot of files are missing from the dist folder that were previously present in the build folder of the npm package. Most notably the index.d.ts file. I think this omission has been caused by a setting in tsconfig.json: |
Regarding importing types from the dist/types: When doing the above, I get the following TS2459 error:
The above occurs for all the other imports as well (i.e. Measurement, ClientMeasurementObject). I'm wondering if the interfaces declared within @rcpch/digital-growth-charts-react-component-library/dist/types.d.ts should be 'export interface' instead of 'interface'? |
I'm also getting a TS2724 error when attempting to import the RCPCHChartProps: My previous import code fetched directly from the types file for the RCPCHChart, but this file is no longer present in the build folder. Should this be appearing in the dist/types file instead?
|
Thanks @dmc-cambric for this super helpful and detailed information. I meant to tidy the build folder in the process of stripping out the raw font files but should have thought about it a bit more clearly before refactoring things. I am sorry. I have set it all back to the way it was. Let me know here if I have missed something. |
closed with #108 |
Hi guys,
Have attempted an upgrade from v7.0.9 to v7.0.11 in our app, however it appears that importing the RCPCHChart react component is no longer possible. Is this potentially related to recent build changes?
Import code:
Generated error:
Another potential issue I've spotted is the type importing, previously these were being fetched from the build folder within the package. (see below examples)
I've had to update these to instead fetch from the src folder for the build to work correctly, i.e.
Curious if this is an intentional change or if types should be getting imported differently.
Any help you can give is much appreciated!
The text was updated successfully, but these errors were encountered: