Storybook: Can we add custom configuration to addons?

Created on 21 Aug 2020  路  1Comment  路  Source: nuxt-community/storybook


I have the addon @storybook/preset-scss and I would like to prepend a custom variables file to all SCSS files, and to do so I need to add some custom configurations. However, when I add it I get the message MODULE NOT FOUND.
Here is the configuration I'm using (Which I'm already using in another Storybook project but that one isn't currently using @nuxt/storybook):

addons: [
    {
      name: '@storybook/preset-scss',
      options: {
        rule: {
          include: [/\.sass$/],
        },
        sassLoaderOptions: {
          prependData: `@import '${customVariablesPath}'`,
          sassOptions: {
            indentedSyntax: true
          }
        },
      }
    },
    {
      name: '@storybook/preset-scss',
      options: {
        rule: {
          include: [/\.scss$/],
        },
        sassLoaderOptions: {
          prependData: `@import '${customVariablesPath}';`,
        },
      }
    },
  ]
question

Most helpful comment

Hey,
Thanks for the issue, Currently the module does not support addon configuration. I'll create a PR to add this feature

>All comments

Hey,
Thanks for the issue, Currently the module does not support addon configuration. I'll create a PR to add this feature

Was this page helpful?
0 / 5 - 0 ratings

Related issues

macieklad picture macieklad  路  4Comments

armorkram picture armorkram  路  3Comments

homerjam picture homerjam  路  4Comments

altryne picture altryne  路  4Comments

Sananes picture Sananes  路  3Comments