Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
webpack configuration to work with storybook and apollo-client
// load the default config generator.
var genDefaultConfig = require('@kadira/storybook/dist/server/config/defaults/webpack.config.js');
module.exports = function (config, env) {
var conf = genDefaultConfig(config, env);
// add es6 support for node_modules
// config structure is here
// https://github.com/storybooks/react-storybook/blob/d0fd01054f02e79518d36a6fbb238c24577fef83/dist/server/config/webpack.config.js
conf.module.loaders[0].exclude = /node_modules\/(?!(apollo-client)\/).*/;
return conf;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.