Created
February 24, 2017 19:22
-
-
Save duranmla/70e1fbc97e10c3978cef9d8e340ef977 to your computer and use it in GitHub Desktop.
webpack configuration to work with storybook and apollo-client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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