You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding an assets array to the build-storybook configuration options results in an error.
Expected Behavior
Before the builder got switched to @storybook/angular (by #9332) this was a solution to get assets (eg. fonts) from an other app/lib to the storybook instance.
The change to use the official storybook builder should have been a breaking one and thus not released in minor.
Hi @TomTomB ! You are correct, it should not have been released in a minor release. I am really sorry that you are experiencing issues.
Here is the documentation about how you can add assets in the latest versions of Storybook. assets is no longer supported (and that was a change in Storybook rather than Nx), nor is staticDir within the target. The staticDir configuration changed in Storybook 6.4, and now you must use the staticDirs array inside your project's .storybook/main.js.
We tried making the migrator as good as possible, but it would be a bit tricky to move the assets and the staticDir's automatically, so we left that to be fixed by hand. I am really sorry that you are experiencing this issue, and I hope this helps you solve it. Again, you are correct, this change should have been made in a major version.
Current Behavior
Adding an
assets
array to thebuild-storybook
configuration options results in an error.Expected Behavior
Before the builder got switched to @storybook/angular (by #9332) this was a solution to get assets (eg. fonts) from an other app/lib to the storybook instance.
The change to use the official storybook builder should have been a breaking one and thus not released in minor.
Steps to Reproduce
Create an angular workspace:
npx create-nx-workspace --name=sb-issue --preset=angular --appName my-app --style css --nxCloud false
Generate a lib:
npm run ng generate @nrwl/angular:library --name ui --buildable true
Add the storybook config to the lib (just say no to all prompts):
npm run ng generate @nrwl/angular:storybook-configuration --name ui
Add the following config to the lib's project.json inside the
build-storybook
target options objectSidenote: The option
staticDir
isnt supported either (used as a solution in #2895)npm run ng run ui:storybook
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: