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
Describe the bug
NextJS, Vercel and Storybook don't work nicely together when using the Next default of removing trailing slashes.
The problem is that Storybook expects a trailing slash in the URL, while Next removes trailing slashes by default. This can be flipped to require trailing slashes, but only for all URLs.
Another way around this is a custom route, but Vercel doesn't support custom routers.
While this isn't either Next's bug nor Storybook's, it'd be great if they could work together.
To Reproduce git clone git@github.com:votemike/next-storybook-example.git && cd next-storybook-example && yarn install && yarn build-storybook && yarn dev
Then visit http://localhost:3000/styleguide and notice that Storybook does not load correctly.
Describe the bug
NextJS, Vercel and Storybook don't work nicely together when using the Next default of removing trailing slashes.
The problem is that Storybook expects a trailing slash in the URL, while Next removes trailing slashes by default. This can be flipped to require trailing slashes, but only for all URLs.
Another way around this is a custom route, but Vercel doesn't support custom routers.
While this isn't either Next's bug nor Storybook's, it'd be great if they could work together.
To Reproduce
git clone git@github.com:votemike/next-storybook-example.git && cd next-storybook-example && yarn install && yarn build-storybook && yarn dev
Then visit http://localhost:3000/styleguide and notice that Storybook does not load correctly.
System
Environment Info:
System:
OS: macOS 11.4
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Binaries:
Node: 14.16.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.12 - /usr/local/bin/npm
Browsers:
Chrome: 91.0.4472.114
Firefox: 70.0.1
Safari: 14.1.1
npmPackages:
@storybook/addon-actions: ^6.3.0 => 6.3.0
@storybook/addon-essentials: ^6.3.0 => 6.3.0
@storybook/addon-links: ^6.3.0 => 6.3.0
@storybook/react: ^6.3.0 => 6.3.0
Additional context
I think this could be fixed by allowing Storybook to be accessed on URLs without trailing slashes.
Maybe there is a better way.
The text was updated successfully, but these errors were encountered: