cytoscape-react-fe-ml
Version:
50 lines (44 loc) • 1.39 kB
JavaScript
const path = require('path');
// Export a function. Accept the base config as the only param.
module.exports = (storybookBaseConfig, configType) => {
// configType has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.
// Make whatever fine-grained changes you need
storybookBaseConfig.module.rules.push({
test: /(\.css|\.scss)$/,
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
includePaths: [
path.resolve(__dirname, '../node_modules/sass-theme-fe-ml/default')
],
minimize: true
}
}
],
include: path.resolve(__dirname, '../')
});
storybookBaseConfig.module.rules.push({
test: /\.md$/,
use: [
{
loader: 'html-loader',
},
{
loader: 'markdown-loader',
},
],
});
storybookBaseConfig.module.rules.push({
test: /\.(eot|ttf|woff|woff2|svg|otf|png|jpg|gif)$/,
use: [{
loader: 'file-loader'
}]
});
// Return the altered config
return storybookBaseConfig;
};