Add Storybook config
This commit is contained in:
10
src/.storybook/config.js
Normal file
10
src/.storybook/config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import {configure} from '@storybook/react';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
|
||||
const req = require.context('../browser/components', true, /\.stories\.jsx$/)
|
||||
|
||||
function loadStories() {
|
||||
req.keys().forEach((filename) => req(filename))
|
||||
}
|
||||
|
||||
configure(loadStories, module);
|
7
src/.storybook/webpack.config.js
Normal file
7
src/.storybook/webpack.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const path = require("path");
|
||||
|
||||
// https://storybook.js.org/configurations/custom-webpack-config/#full-control-mode--default
|
||||
module.exports = (baseConfig, env, defaultConfig) => {
|
||||
defaultConfig.resolve.modules = [path.resolve(__dirname, '../node_modules'), 'node_modules'];
|
||||
return defaultConfig;
|
||||
}
|
Reference in New Issue
Block a user