{"action":"opened","issue":{"url":"https://api.github.com/repos/rangle/rangle-starter/issues/81","repository_url":"https://api.github.com/repos/rangle/rangle-starter","labels_url":"https://api.github.com/repos/rangle/rangle-starter/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/rangle/rangle-starter/issues/81/comments","events_url":"https://api.github.com/repos/rangle/rangle-starter/issues/81/events","html_url":"https://github.com/rangle/rangle-starter/issues/81","id":145709000,"number":81,"title":"Give `SplitByPathPlugin` a try","user":{"login":"SethDavenport","id":4614141,"avatar_url":"https://avatars.githubusercontent.com/u/4614141?v=3","gravatar_id":"","url":"https://api.github.com/users/SethDavenport","html_url":"https://github.com/SethDavenport","followers_url":"https://api.github.com/users/SethDavenport/followers","following_url":"https://api.github.com/users/SethDavenport/following{/other_user}","gists_url":"https://api.github.com/users/SethDavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/SethDavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SethDavenport/subscriptions","organizations_url":"https://api.github.com/users/SethDavenport/orgs","repos_url":"https://api.github.com/users/SethDavenport/repos","events_url":"https://api.github.com/users/SethDavenport/events{/privacy}","received_events_url":"https://api.github.com/users/SethDavenport/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rangle/rangle-starter/labels/es6-react","name":"es6-react","color":"bfe5bf"},{"url":"https://api.github.com/repos/rangle/rangle-starter/labels/ng1","name":"ng1","color":"bfd4f2"},{"url":"https://api.github.com/repos/rangle/rangle-starter/labels/ng2","name":"ng2","color":"d4c5f9"},{"url":"https://api.github.com/repos/rangle/rangle-starter/labels/ng2-minimal","name":"ng2-minimal","color":"e99695"},{"url":"https://api.github.com/repos/rangle/rangle-starter/labels/ts-react","name":"ts-react","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-04T14:57:06Z","updated_at":"2016-04-04T14:57:06Z","closed_at":null,"body":"A suggestion from @alexs.\n\nThis may be a simpler approach to splitting the vendor and app bundles from webpack:\n\n```javascript\nentry: [\n        'es6-shim',\n        'angular2/bundles/angular2-polyfills',\n        'shims_for_IE',\n        './src/index.ts',\n    ],```\n```\n\n> that’s it, no vendor list, all ‘node_modules’ will go to vendor.js\n\n ```\nconst plugins = [\n    new SplitByPathPlugin([\n        { name: 'vendor', path: [__dirname + '/node_modules'] }\n    ]),\n    new HtmlWebpackPlugin({ template: './src/index.html', inject: 'body' })\n];\n```\n\nThis is certainly a DRYer configuration approach.  I'd like to also see what (if any) effect it has on bundle size."}}