@fitch-digital/fitch-ui
Version:
UI Library for Fitch Digital Projects
31 lines (25 loc) • 862 B
JavaScript
const path = require('path');
// Export a function. Accept the base config as the only param.
module.exports = async ({ config, mode }) => {
// `mode` 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
config.module.rules.push({
test: /\.scss$/,
sideEffects: true,
loaders: [
'style-loader',
'css-loader',
'sass-loader'
],
include: path.resolve(__dirname, "../")
});
config.module.rules.push({
test: /\.stories\.jsx?$/,
loaders: [require.resolve('@storybook/addon-storysource/loader')],
enforce: 'pre',
});
// Return the altered config
return config;
};