{"action":"opened","issue":{"url":"https://api.github.com/repos/istarkov/babel-plugin-webpack-loaders/issues/88","repository_url":"https://api.github.com/repos/istarkov/babel-plugin-webpack-loaders","labels_url":"https://api.github.com/repos/istarkov/babel-plugin-webpack-loaders/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/istarkov/babel-plugin-webpack-loaders/issues/88/comments","events_url":"https://api.github.com/repos/istarkov/babel-plugin-webpack-loaders/issues/88/events","html_url":"https://github.com/istarkov/babel-plugin-webpack-loaders/issues/88","id":155236508,"number":88,"title":"webpack@2 support","user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-17T11:25:35Z","updated_at":"2016-05-17T11:25:35Z","closed_at":null,"body":"webpack 2 supports a function as config (see https://gist.github.com/sokra/27b24881210b56bbaff7#configuration).\r\nThis is currently breaking this plugin.\r\n\r\n```\r\nUncaught Exception: .../web_modules/Logo/__tests__/index.js\r\n  TypeError: .../web_modules/Logo/__tests__/index.js: Cannot read property 'loaders' of undefined\r\n    at PluginPass.CallExpression (.../node_modules/babel-plugin-webpack-loaders/lib/plugin.js:81:26)\r\n    at newFn (.../node_modules/babel-core/node_modules/babel-traverse/lib/visitors.js:262:19)\r\n    at NodePath._call (.../node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:63:18)\r\n    at NodePath.call (.../node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:47:17)\r\n    at NodePath.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:93:12)\r\n    at TraversalContext.visitQueue (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:152:16)\r\n    at TraversalContext.visitSingle (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:115:19)\r\n    at TraversalContext.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:184:19)\r\n    at Function.traverse.node (.../node_modules/babel-core/node_modules/babel-traverse/lib/index.js:135:17)\r\n    at NodePath.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:103:22)\r\n    at TraversalContext.visitQueue (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:152:16)\r\n    at TraversalContext.visitMultiple (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:110:17)\r\n    at TraversalContext.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:182:19)\r\n    at Function.traverse.node (.../node_modules/babel-core/node_modules/babel-traverse/lib/index.js:135:17)\r\n    at NodePath.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:103:22)\r\n    at TraversalContext.visitQueue (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:152:16)\r\n    at TraversalContext.visitSingle (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:115:19)\r\n    at TraversalContext.visit (.../node_modules/babel-core/node_modules/babel-traverse/lib/context.js:184:19)\r\n    at Function.traverse.node (.../node_modules/babel-core/node_modules/babel-traverse/lib/index.js:135:17)\r\n    at Object.traverse [as default] (.../node_modules/babel-core/node_modules/babel-traverse/lib/index.js:69:12)\r\n    at .../node_modules/babel-core/lib/transformation/file/index.js:513:33\r\n    at Array.forEach (native)\r\n``` \r\n\r\nI will try to make a PR."}}