{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/2490","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/2490/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/2490/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/2490/events","html_url":"https://github.com/webpack/webpack/issues/2490","id":154879210,"number":2490,"title":"[webpack 2] `watch` & System.import compile with new chunk name","user":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/webpack/webpack/labels/webpack-2","name":"webpack-2","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-05-14T22:39:36Z","updated_at":"2016-06-22T18:53:54Z","closed_at":null,"body":"I've search high and low; I don't think anyone has reported this yet.\r\n\r\nI'm building an application using dynamic code splitting with `System.import`, as detailed [here](https://gist.github.com/sokra/27b24881210b56bbaff7#dynamic-expressions). I've got a build that spits out an entry point (`app.js`) and two chunks (`0.js` & `1.js`). However, when running with `--watch`, if I make a change in one of the dependencies of `0` or `1`, `webpack` rebuilds the chunk with a new name, ouputting a new `3.js` chunk instead of updating the already-built chunks.\r\n\r\nBecause the main `app.js` chunk hasn't changed, it continues to load the already-emitted chunk `0.js` or `1.js` chunk (depending on the page), so the changes don't actually show up in the loaded scripts.\r\n\r\nHere's my `webpack.config.js`:\r\n\r\n```js\r\nmodule.exports = {\r\n    entry: {\r\n        'app': './app.js'\r\n    },\r\n    devtool: 'sourcemap',\r\n    debug: true,\r\n    output: {\r\n        path: './build/',\r\n        filename: '[name].js',\r\n        publicPath: './build/'\r\n    },\r\n    module: {\r\n        loaders: [\r\n            {\r\n                test: /\\.js$/,\r\n                loader: 'babel'\r\n            },\r\n            {\r\n                test: /\\.hbs$/,\r\n                loader: 'handlebars'\r\n            }\r\n        ]\r\n    },\r\n    resolve: {\r\n        mainFields: ['jsnext:main', 'main']\r\n    },\r\n    plugins: []\r\n};\r\n```\r\n\r\nHere's the output:\r\n\r\n```bash\r\n± |master {1} U:3 ✗| → webpack --watch\r\nHash: 101fd3abf438ec13be47\r\nVersion: webpack 2.1.0-beta.7\r\nTime: 10508ms\r\n     Asset     Size  Chunks             Chunk Names\r\n      0.js   236 kB       0  [emitted]\r\n      1.js   326 kB       1  [emitted]\r\n    app.js   929 kB       2  [emitted]  app\r\n  0.js.map   291 kB       0  [emitted]\r\n  1.js.map   522 kB       1  [emitted]\r\napp.js.map  1.57 MB       2  [emitted]  app\r\n  [12] ./pages async ^\\.\\/.*\\/controller$ 160 bytes {2} [built]\r\n    + 307 hidden modules\r\n\r\nHash: 824513638c96c8df229c\r\nVersion: webpack 2.1.0-beta.7\r\nTime: 603ms\r\n   Asset    Size  Chunks             Chunk Names\r\n    3.js  236 kB       3  [emitted]\r\n3.js.map  291 kB       3  [emitted]\r\n  [12] ./pages async ^\\.\\/.*\\/controller$ 160 bytes {2} [built]\r\n    + 307 hidden modules\r\n```"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/227842298","html_url":"https://github.com/webpack/webpack/issues/2490#issuecomment-227842298","issue_url":"https://api.github.com/repos/webpack/webpack/issues/2490","id":227842298,"user":{"login":"mAAdhaTTah","id":4371429,"avatar_url":"https://avatars.githubusercontent.com/u/4371429?v=3","gravatar_id":"","url":"https://api.github.com/users/mAAdhaTTah","html_url":"https://github.com/mAAdhaTTah","followers_url":"https://api.github.com/users/mAAdhaTTah/followers","following_url":"https://api.github.com/users/mAAdhaTTah/following{/other_user}","gists_url":"https://api.github.com/users/mAAdhaTTah/gists{/gist_id}","starred_url":"https://api.github.com/users/mAAdhaTTah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mAAdhaTTah/subscriptions","organizations_url":"https://api.github.com/users/mAAdhaTTah/orgs","repos_url":"https://api.github.com/users/mAAdhaTTah/repos","events_url":"https://api.github.com/users/mAAdhaTTah/events{/privacy}","received_events_url":"https://api.github.com/users/mAAdhaTTah/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T18:53:54Z","updated_at":"2016-06-22T18:53:54Z","body":"Nice! If that does work, hope it gets integrated soon. The best I can do in terms of a reproducible test case would be to update the `example/code-splitting-harmony` to import a subdependency and see if I can reproduce it there."}}
{"actor":{"display_login":"mAAdhaTTah"}}