{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1716","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1716/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1716/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1716/events","html_url":"https://github.com/webpack/webpack/issues/1716","id":120551445,"number":1716,"title":"Chunks generated with require.ensure do not respect output path","user":{"login":"phaistonian","id":796530,"avatar_url":"https://avatars.githubusercontent.com/u/796530?v=3","gravatar_id":"","url":"https://api.github.com/users/phaistonian","html_url":"https://github.com/phaistonian","followers_url":"https://api.github.com/users/phaistonian/followers","following_url":"https://api.github.com/users/phaistonian/following{/other_user}","gists_url":"https://api.github.com/users/phaistonian/gists{/gist_id}","starred_url":"https://api.github.com/users/phaistonian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phaistonian/subscriptions","organizations_url":"https://api.github.com/users/phaistonian/orgs","repos_url":"https://api.github.com/users/phaistonian/repos","events_url":"https://api.github.com/users/phaistonian/events{/privacy}","received_events_url":"https://api.github.com/users/phaistonian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-12-05T12:38:58Z","updated_at":"2016-09-20T07:32:18Z","closed_at":"2016-02-18T05:26:47Z","body":"Hello.\r\n\r\n```javascript\r\nrequire.ensure(['../public/js/test-ensure.js'], function(require) {\r\n  let test = require('../public/js/test-ensure.js');\r\n  console.log(test);\r\n});\r\n```\r\n\r\nThe above code works fine in dev, yet in production (-p) results in loading the generared chunks from the current path and not the path set for output in the config.\r\n\r\nAdditionally, if I have a `<base ..>` set in my `<head>` then the script being loaded (chuck) points to the `baseUri/chunk.js` and that's (of course) not found.\r\n\r\nHow do I tell webpack where to look for the chunk, or how do I make it \"respect\" the webpack.config.output path and not use the current path?\r\n\r\nThank you.\r\n"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/248225758","html_url":"https://github.com/webpack/webpack/issues/1716#issuecomment-248225758","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1716","id":248225758,"user":{"login":"StrongerSY","id":15058600,"avatar_url":"https://avatars.githubusercontent.com/u/15058600?v=3","gravatar_id":"","url":"https://api.github.com/users/StrongerSY","html_url":"https://github.com/StrongerSY","followers_url":"https://api.github.com/users/StrongerSY/followers","following_url":"https://api.github.com/users/StrongerSY/following{/other_user}","gists_url":"https://api.github.com/users/StrongerSY/gists{/gist_id}","starred_url":"https://api.github.com/users/StrongerSY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrongerSY/subscriptions","organizations_url":"https://api.github.com/users/StrongerSY/orgs","repos_url":"https://api.github.com/users/StrongerSY/repos","events_url":"https://api.github.com/users/StrongerSY/events{/privacy}","received_events_url":"https://api.github.com/users/StrongerSY/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T07:32:18Z","updated_at":"2016-09-20T07:32:18Z","body":"I also encounter this problem ! The chunk files' paths are all relative to my website root url ~ But I can't set the path of chunkfile"}}
{"actor":{"display_login":"StrongerSY"}}