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

[Bug] Does not work with Nx #38

Open
kroeder opened this issue Aug 26, 2022 · 1 comment
Open

[Bug] Does not work with Nx #38

kroeder opened this issue Aug 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kroeder
Copy link
Member

kroeder commented Aug 26, 2022

Describe the bug

In Nx, you have a root .storybook directory but the actual storybook projects are nexted in "apps/" or "libs/". As soon as you run Storybook in an Nx repo, it looks for root/.storybook/tsconfig.json instead of, e.g. libs/my-lib/.storybook/tsconfig.json

Workaround

Create a .storybook/tsconfig.json or use the existing one as a proxy config

{
  "extends": "../packages/storybook/.storybook/tsconfig.json"
}
@kroeder kroeder added the bug Something isn't working label Aug 26, 2022
@kroeder kroeder added this to the Storybook 7.0 support milestone Aug 26, 2022
@Etienne-Buschong
Copy link
Collaborator

Currently the path the tsconfig which should be used is hard-coded in the constants.
I think the solution would be to replace the hard-coded constant by a plugin option

https://github.com/storybookjs/webpack-angular-types-plugin/blob/main/packages/storybook-webpack-angular-types-plugin/src/lib/webpack-angular-types-plugin/plugin.ts#L19

Would this resolve your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants