@nuxtjs/storybook: 1.2.0
nuxt: v2.14.1
npm i -D @storybook/addon-essentialsnpx nuxt-storybook Storybook working
WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
info => Loading presets
WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
info => Loading config/preview file in "/Users/alex/fundbox/website_storyblok/storybook".
info => Loading config/preview file in "/Users/alex/fundbox/website_storyblok/storybook".
WARN We found no files matching any of the following globs:
WARN
WARN ~/components/**/*.stories.@(ts|js)
WARN ~/stories/**/*.stories.js
WARN
WARN Maybe your glob was invalid?
WARN see: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#correct-globs-in-mainjs
WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
WARN Unable to close preview build!
ERR! WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
ERR! - configuration.entry should not contain the item '/Users/alex/fundbox/website_storyblok/node_modules/@storybook/addon-actions/dist/register.js' twice.
ERR! -> A non-empty array of non-empty strings
ERR! at webpack (/Users/alex/fundbox/website_storyblok/node_modules/webpack/lib/webpack.js:31:9)
ERR! at /Users/alex/fundbox/website_storyblok/node_modules/@storybook/core/dist/server/dev-server.js:69:48
ERR! WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
ERR! - configuration.entry should not contain the item '/Users/alex/fundbox/website_storyblok/node_modules/@storybook/addon-actions/dist/register.js' twice.
ERR! -> A non-empty array of non-empty strings
ERR! at webpack (/Users/alex/fundbox/website_storyblok/node_modules/webpack/lib/webpack.js:31:9)
ERR! at /Users/alex/fundbox/website_storyblok/node_modules/@storybook/core/dist/server/dev-server.js:69:48
@nuxtjs/storybook internally register @storybook/addon-actions, if you want to use @storybook/addon-essentials you need to disable actions addon
addons: [{
name: '@storybook/addon-essentials',
options: {
actions: false,
}
}]
@farnabaz given that actions are bundled into essentials in storybook, maybe it's worth bundling essentials instead of just actions in nuxt/storybook?
actions are required for nuxt-link mock component. I see no reason to embed unused addons in the package. Also, this may break current projects.
Maybe we could create a separate issue to discuss bundled addons
The thing is that the official storybook docs say:
Storybook ships by default with a set of “essential” addons that add to the initial user experience.
Docs
Controls
Actions
Viewport
Backgrounds
Toolbars & globals
That lead on my side to confusion because I was expecting them to be present but they weren't.
In general I agree with @farnabaz but because of the documentation I would suggest to add them.
Most helpful comment
actionsare required fornuxt-linkmock component. I see no reason to embed unused addons in the package. Also, this may break current projects.Maybe we could create a separate issue to discuss bundled addons