Framework name is not stripped in terminal log
Opened this issue · 5 comments
The builder name log is verbose as shown below, which is much more verbose than Vite or webpack framework. There's a strip function https://github.com/storybookjs/storybook/blob/a5c7f7fd16643c3aa85fceb9149e3d2e83b9ef7d/code/lib/core-server/src/build-dev.ts#L216-L219 which only works with @storybook/name
frameworks.
it shows a full path because the framework
option is from getAbsolutePath
. it's okay if we use framework: 'storybook-react-rsbuild'
instead of framework: getAbsolutePath('storybook-react-rsbuild')
@tmkx
Yes, it will. However, it's very prone to failed to find addons / builder / frameworks in a pnpm monorepo without a resolved dep path. (see how frequency getAbsolutePath
is being used in Storybook https://github.com/search?q=repo%3Astorybookjs%2Fstorybook%20getAbsolutePath&type=code)
I mean it works as expected in user's projects. it shows the full path in this repo only.
the users use 'storybook-react-rsbuild'
directly, which doesn't have this issue.
It will show as expected in user project ONLY IF they don't use getAbsolutePath
. But official's framework will show the neat name EVEN WITH getAbsolutePath
.
i see, this may occur in a monorepo which shares Storybook dependencies. agree with u that it's better to do something like frameworkName.split(/[\\/]/).at(-1)
in storybook