Skip to content

Commit

Permalink
build(storybook): basic storybook config works with slow way setup
Browse files Browse the repository at this point in the history
slow way:
https://storybook.js.org/basics/guide-vue/
AND fix bug:
storybookjs/storybook#3267 (comment)
Then should be good after some cleanup
  • Loading branch information
Adam Chen Wei committed Oct 18, 2018
1 parent ac31ad2 commit d154665
Show file tree
Hide file tree
Showing 6 changed files with 22,021 additions and 128 deletions.
22 changes: 22 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { configure } from '@storybook/vue';

import Vue from 'vue';
//import Vuex from 'vuex'; // Vue plugins

// Import your custom components.
//import Mybutton from '../src/stories/Button.vue';
import HelloWorld from '../src/components/HelloWorld.vue';

// Install Vue plugins.
//Vue.use(Vuex);

// Register custom components.
Vue.component('HelloWorld', HelloWorld);

function loadStories() {
// You can require as many stories as you need.
require('../src/stories');
}

configure(loadStories, module);

8 changes: 8 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = (baseConfig, env, defaultConfig) => {

defaultConfig.plugins.push(new VueLoaderPlugin())

return defaultConfig;
};
Loading

0 comments on commit d154665

Please sign in to comment.