view_component_storybook icon indicating copy to clipboard operation
view_component_storybook copied to clipboard

routing error when previewing stories

Open gaultierq opened this issue 2 years ago • 4 comments

Hello,

I have a 404 routing error when I try to preview my stories.

I noticed that removing the internal: true option, let the route appear among the rails routes list, and the preview was displayed nicely.

I didn't find much documentation about this internal flag, and I don't really know what i missed.

My setup is the following :

  • rails 7, view_component_storybook (0.11.1)
  • app running on http://app.local:3000
  • storybook server running on http://app.local:6006
  • asset server (vite) running on http://app.local:3036
  • cors configured to allow GET request from any origin to rails/stories/*

gaultierq avatar Oct 08 '22 15:10 gaultierq

Can you retest this with v1 as many of the internals (and the preview path) have changed.

jonspalmer avatar Jan 21 '23 14:01 jonspalmer

The same problem still occurs with v1.0.0: ActionController::RoutingError.

gaultierq avatar Jan 21 '23 16:01 gaultierq

Can you perhaps share a working example the example with this project works great. It would be good to examine what the differences might be in your setup

jonspalmer avatar May 27 '23 16:05 jonspalmer

Is this a dup of #164? I wonder if Vite is the difference here?

jonspalmer avatar May 27 '23 16:05 jonspalmer