Closed huang-julien closed 3 weeks ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | be1bb487ac1afcb5f9ba6252de132e1833f93017 |
Good idea, this would also resolve https://github.com/nuxt-modules/storybook/issues/555, right?
I'm not so sure about the name of the option. Currently, the module indeed only starts the storybook server - but that may change in the future. So I would prefer a name that reflects that only the storybook dev server can be disabled by this option. Tailwind has it under viewer. Maybe just also use viewer
here for storybook? Or do you have better suggestion?
oh indeed.
About the name, i'm not convinced that viewer
is a good name. This option just prevent the whole module from being run. viewer
would fit an option that control if the module adds the storybook tab or not in the devtools.
I don't really have any other suggestion, but i think some other modules are also using enabled
Okay, if more fine-grained control is needed in the future, we can add another viewer/devserver/whatever
option in the future.
Could you please add a short description of the option to https://github.com/nuxt-modules/storybook/blob/main/docs/content/1.getting-started/2.options.md (perhaps with your use case of layers as motivation). Otherwise this looks good from my side.
Thanks!
Fixes #555 and fixes https://github.com/storybook-vue/storybook-nuxt/issues/63.
Hi :wave: this PR adds an
enabled
option.This can be useful for layers. Some users have project A, B with A extending B that has storybook but is not needed in A. This can improve dev server startup as storybook can be quite heavy to load on bigger projects.