{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/worker-loader/issues/5","labels_url":"https://api.github.com/repos/webpack/worker-loader/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/webpack/worker-loader/issues/5/comments","events_url":"https://api.github.com/repos/webpack/worker-loader/issues/5/events","html_url":"https://github.com/webpack/worker-loader/issues/5","id":89341345,"number":5,"title":"Name worker chunk files","user":{"login":"dfoverdx","id":3087358,"avatar_url":"https://avatars.githubusercontent.com/u/3087358?v=3","gravatar_id":"","url":"https://api.github.com/users/dfoverdx","html_url":"https://github.com/dfoverdx","followers_url":"https://api.github.com/users/dfoverdx/followers","following_url":"https://api.github.com/users/dfoverdx/following{/other_user}","gists_url":"https://api.github.com/users/dfoverdx/gists{/gist_id}","starred_url":"https://api.github.com/users/dfoverdx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfoverdx/subscriptions","organizations_url":"https://api.github.com/users/dfoverdx/orgs","repos_url":"https://api.github.com/users/dfoverdx/repos","events_url":"https://api.github.com/users/dfoverdx/events{/privacy}","received_events_url":"https://api.github.com/users/dfoverdx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-18T16:48:21Z","updated_at":"2015-09-03T19:01:07Z","closed_at":null,"body":"I have two different workers.  The only way to distinguish the output files is to include `[hash]` which means my output directory gets flooded with old versions of my worker files.  It would be nice to be able to specify the name, or automatically pull it from the entry filename.\r\n\r\nI wrote a quick workaround in index.js:\r\n\r\n    // ...\r\n    var workerCompiler = this._compilation.createChildCompiler(\"worker\", outputOptions);\r\n    workerCompiler.apply(new WebWorkerTemplatePlugin(outputOptions));\r\n\r\n    // get the specified name from the query, or fall back to the filename without its extension\r\n    var requestName = query.name || request.replace(/^.*[\\\\\\/](.*)(\\.[^\\.]*)$/, '$1');\r\n    workerCompiler.apply(new SingleEntryPlugin(this.context, \"!!\" + request, requestName));\r\n    if(this.options && this.options.worker && this.options.worker.plugins) {\r\n    // ..."},"comment":{"url":"https://api.github.com/repos/webpack/worker-loader/issues/comments/137542983","html_url":"https://github.com/webpack/worker-loader/issues/5#issuecomment-137542983","issue_url":"https://api.github.com/repos/webpack/worker-loader/issues/5","id":137542983,"user":{"login":"ianwalter","id":122028,"avatar_url":"https://avatars.githubusercontent.com/u/122028?v=3","gravatar_id":"","url":"https://api.github.com/users/ianwalter","html_url":"https://github.com/ianwalter","followers_url":"https://api.github.com/users/ianwalter/followers","following_url":"https://api.github.com/users/ianwalter/following{/other_user}","gists_url":"https://api.github.com/users/ianwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/ianwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianwalter/subscriptions","organizations_url":"https://api.github.com/users/ianwalter/orgs","repos_url":"https://api.github.com/users/ianwalter/repos","events_url":"https://api.github.com/users/ianwalter/events{/privacy}","received_events_url":"https://api.github.com/users/ianwalter/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T19:01:07Z","updated_at":"2015-09-03T19:01:07Z","body":":+1: Even if you don't have two workers, how do you specify the naming or replace the old files so that you don't have to keep manually deleting them every time you make a change to the worker file?"}}