swisnl / vue-cli-plugin-svg-sprite

vue-cli 3 plugin to build an SVG sprite
MIT License
68 stars 11 forks source link

vue-cli-plugin-svg-sprite with Storybook #1

Closed acopalipsis closed 5 years ago

acopalipsis commented 5 years ago

How to use vue-cli-plugin-svg-sprite with storybook? webpack.config storybook can be extended. But how to write a config that vue-cli-plugin-svg-sprite worked??

bbrala commented 5 years ago

Good question, ill tag my colleage, he is currently on personal leave though so it might take a bit.

@JaZo could you check this out?

JaZo commented 5 years ago

Hi @acopalipsis, I personally have no experience with Storybook. I've had a look at their documentation (https://storybook.js.org/basics/guide-vue/) and it doesn't look like you can use Vue CLI plugins directly. However, you might give https://github.com/storybooks/vue-cli-plugin-storybook a try and allow the Webpack plugin added by our Vue CLI plugin.

vue.config.js

{
  pluginOptions: {
    storybook: {
      allowedPlugins: [
        'svg-sprite'
      ]
    }
  }
}

More details about using Storybook with Vue CLI 3: https://github.com/storybooks/storybook/issues/3267