Skip to content

Commit

Permalink
fix(storybook): register components inside guard
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Aug 2, 2020
1 parent ebc00c0 commit ac8611f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
import Vue from 'vue'
import '~storybook/mock'
<% if (options.store) { %>import { createStore } from '~~/.nuxt-storybook/store'<% } %>
<% if (options.components) { %>import * as components from '~~/.nuxt-storybook/components'<% } %>
<% if (options.components) { %>import * as components from '~~/.nuxt-storybook/components';
Object.keys(components).forEach(name => Vue.component(name, components[name]))<% } %>
/* Plugins */
<% options.plugins.forEach((plugin) => { %>import <%= plugin.name %> from '<%= plugin.name %>' // Source: <%= relativeToBuild(plugin.src) %> (mode: '<%= plugin.mode %>')
<% }) %>

/* Components */
Object.keys(components).forEach(name => Vue.component(name, components[name]))


const inject = (name, impl) => {
Expand Down

0 comments on commit ac8611f

Please sign in to comment.