Skip to content

Instantly share code, notes, and snippets.

@aaronmcadam
Created September 15, 2017 13:17
Show Gist options
  • Save aaronmcadam/1ec280b4a1484f01e9492f887ae0af65 to your computer and use it in GitHub Desktop.
Save aaronmcadam/1ec280b4a1484f01e9492f887ae0af65 to your computer and use it in GitHub Desktop.
const webpack = require('webpack');
const HappyPack = require('happypack');
const AutoDllPlugin = require('autodll-webpack-plugin');
module.exports = (storybookBaseConfig, configType) => {
console.log('storybookBaseConfig.output', storybookBaseConfig.output);
storybookBaseConfig.plugins = [
new webpack.HotModuleReplacementPlugin(),
new webpack.ProgressPlugin(),
new HappyPack({
loaders: ['babel-loader'],
}),
];
storybookBaseConfig.module.rules = [
{
test: /\.js$/,
loaders: ['cache-loader', 'happypack/loader'],
exclude: /dist|node_modules/,
},
];
console.log(
'storybookBaseConfig.modules.rules',
storybookBaseConfig.module.rules
);
return storybookBaseConfig;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment