Add storybook and babel-preset-react

This commit is contained in:
2018-06-28 13:29:55 +05:30
parent 5120086609
commit efcf4febaa
6 changed files with 2035 additions and 107 deletions
+9
View File
@@ -0,0 +1,9 @@
import { configure } from '@storybook/react';
// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
+18
View File
@@ -0,0 +1,18 @@
// you can use this file to add your custom webpack plugins, loaders and anything you like.
// This is just the basic way to add additional webpack configurations.
// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config
// IMPORTANT
// When you add this file, we won't add the default configurations which is similar
// to "React Create App". This only has babel loader to load JavaScript.
module.exports = {
plugins: [
// your custom plugins
],
module: {
rules: [
// add your custom rules.
],
},
};