{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1268","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1268/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1268/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1268/events","html_url":"https://github.com/webpack/webpack/issues/1268","id":95944323,"number":1268,"title":"Setting dynamic publicPath with commons module","user":{"login":"matthisk","id":602837,"avatar_url":"https://avatars.githubusercontent.com/u/602837?v=3","gravatar_id":"","url":"https://api.github.com/users/matthisk","html_url":"https://github.com/matthisk","followers_url":"https://api.github.com/users/matthisk/followers","following_url":"https://api.github.com/users/matthisk/following{/other_user}","gists_url":"https://api.github.com/users/matthisk/gists{/gist_id}","starred_url":"https://api.github.com/users/matthisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthisk/subscriptions","organizations_url":"https://api.github.com/users/matthisk/orgs","repos_url":"https://api.github.com/users/matthisk/repos","events_url":"https://api.github.com/users/matthisk/events{/privacy}","received_events_url":"https://api.github.com/users/matthisk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-19T20:06:57Z","updated_at":"2016-02-03T17:08:36Z","closed_at":"2015-07-19T20:26:09Z","body":"For my deployment of Webpack I have to dynamically set the publicPath through `__webpack_public_path__`. I make use of the CommonsChunkPlugin, where some modules in the commons module depend on the public path to be set to be able to load (font) files. The problem is that settings the `__webpack_public_path__` at the start of my entry file(s) result in it being set after the commons module is loaded, thus the public path not being present for the file loads. What is the best way to solve this issue, is there a way to inject some code into the commons module?"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/179351182","html_url":"https://github.com/webpack/webpack/issues/1268#issuecomment-179351182","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1268","id":179351182,"user":{"login":"epsitec","id":3872435,"avatar_url":"https://avatars.githubusercontent.com/u/3872435?v=3","gravatar_id":"","url":"https://api.github.com/users/epsitec","html_url":"https://github.com/epsitec","followers_url":"https://api.github.com/users/epsitec/followers","following_url":"https://api.github.com/users/epsitec/following{/other_user}","gists_url":"https://api.github.com/users/epsitec/gists{/gist_id}","starred_url":"https://api.github.com/users/epsitec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epsitec/subscriptions","organizations_url":"https://api.github.com/users/epsitec/orgs","repos_url":"https://api.github.com/users/epsitec/repos","events_url":"https://api.github.com/users/epsitec/events{/privacy}","received_events_url":"https://api.github.com/users/epsitec/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T17:08:36Z","updated_at":"2016-02-03T17:08:36Z","body":"@matthisk I am struggling with the same kind of issue, trying to set `__webpack_public_path__` in one chunk only to find that the change is not visible in the other chunks, especially in the hot loader. Can you share your complete `webpack.config.js` file? It might be helpful..."}}