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

Storybook build breaks if Spright depends on Nimble #2528

Open
jattasNI opened this issue Jan 30, 2025 · 0 comments
Open

Storybook build breaks if Spright depends on Nimble #2528

jattasNI opened this issue Jan 30, 2025 · 0 comments
Assignees

Comments

@jattasNI
Copy link
Contributor

jattasNI commented Jan 30, 2025

🧹 Tech Debt

While developing the chat components I hit build issues in Storybook caused by a dependency I introduced from spright-components to nimble-components. For the chat components I worked around it by eliminating the dependency but that's not a viable long term strategy.

The problem is caused by the different ways that the storybook package and the spright-components package import content from nimble-components. All the storybook imports are relative paths to source (to keep turbosnap working) but all the components imports are package imports @ni/nimble-components (to ensure correct package dependencies in the build output). This results in 2 copies of nimble-components classes being pulled in to the storybook build, which leads to type conflicts.

@rajsite thought we might be able to use tsconfig type mappings similar to what we do in SystemLinkShared. We would apply this to storybook's config to map package paths to the corresponding relative paths. We should try this out and see if we can get the build and turbosnap working together.

@jattasNI jattasNI added tech debt triage New issue that needs to be reviewed labels Jan 30, 2025
@m-akinc m-akinc removed the triage New issue that needs to be reviewed label Jan 30, 2025
@m-akinc m-akinc assigned m-akinc and jattasNI and unassigned m-akinc Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants