{"action":"opened","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/2138","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/2138/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/2138/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/2138/events","html_url":"https://github.com/webpack/webpack/issues/2138","id":138536325,"number":2138,"title":"Webpack web-workers loader not working","user":{"login":"xavibonell","id":5735850,"avatar_url":"https://avatars.githubusercontent.com/u/5735850?v=3","gravatar_id":"","url":"https://api.github.com/users/xavibonell","html_url":"https://github.com/xavibonell","followers_url":"https://api.github.com/users/xavibonell/followers","following_url":"https://api.github.com/users/xavibonell/following{/other_user}","gists_url":"https://api.github.com/users/xavibonell/gists{/gist_id}","starred_url":"https://api.github.com/users/xavibonell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavibonell/subscriptions","organizations_url":"https://api.github.com/users/xavibonell/orgs","repos_url":"https://api.github.com/users/xavibonell/repos","events_url":"https://api.github.com/users/xavibonell/events{/privacy}","received_events_url":"https://api.github.com/users/xavibonell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-04T17:39:09Z","updated_at":"2016-03-04T17:39:09Z","closed_at":null,"body":"Hi, I'm building an app using webpack, which it's been incredibly helpful so far,  but now I need to add some web workers into the mix, and I tryed using a built-in plugin to load them, but I followed the example [here](https://github.com/webpack/webpack/tree/master/examples/web-worker), the official repository, and I couldn't make it work.\r\nMy webpack.dev.js looks like this: \r\n\r\n```\r\nimport webpack              from 'webpack';\r\nimport assign               from 'object-assign';\r\nimport webpackDevMiddleware from 'webpack-dev-middleware';\r\nimport webpackHotMiddleware from 'webpack-hot-middleware';\r\n\r\nimport prodCfg              from './webpack.prod.config.js';\r\n\r\nvar ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\r\nvar DEBUG = process.env.NODE_ENV !== 'production' ? true : false;\r\nvar styles = 'css!less';\r\n\r\nObject.assign = assign;\r\n\r\nexport default function (app) {\r\n  const config = Object.assign(prodCfg, {\r\n    devtool: 'cheap-module-inline-source-map',\r\n    entry:  \r\n     [\r\n      'webpack-hot-middleware/client',\r\n      './client',\r\n      'styles/main.less'\r\n    ],\r\n    module: {\r\n      loaders: [\r\n        {\r\n          test:    /\\.jsx?$/,\r\n          exclude: /node_modules/,\r\n          loader:  'babel',\r\n          query:   {\r\n            plugins: [\r\n              [\r\n                'react-transform', {\r\n                transforms: [{\r\n                  transform: 'react-transform-hmr',\r\n                  imports:   ['react'],\r\n                  locals:    ['module']\r\n                }]\r\n              }\r\n              ]\r\n            ]\r\n          }\r\n        },\r\n        {\r\n          test: /\\.css$/,\r\n          loader: DEBUG ? 'style!' + styles : ExtractTextPlugin.extract(styles)\r\n        },\r\n        { \r\n          test: /\\.less$/, \r\n          loader: DEBUG ? 'style!' + styles : ExtractTextPlugin.extract(styles)\r\n        }\r\n      ]\r\n    },\r\n    plugins: [\r\n      new webpack.optimize.OccurenceOrderPlugin(),\r\n      new webpack.HotModuleReplacementPlugin(),\r\n      new webpack.NoErrorsPlugin(),\r\n      new ExtractTextPlugin(\"style.css\", {allChunks: true })\r\n    ],\r\n    worker: {\r\n      output: {\r\n        filename: \"hash.worker.js\",\r\n        chunkFilename: \"[id].hash.worker.js\"\r\n      }\r\n    }\r\n  });\r\n\r\n  const compiler = webpack(config);\r\n\r\n  app.use(webpackDevMiddleware(compiler, {noInfo: true, publicPath: config.output.publicPath}));\r\n  app.use(webpackHotMiddleware(compiler));\r\n}\r\n```\r\n\r\nand when I try to load the file I try it like this:\r\n`\r\nvar Worker = require(\"worker!worker.js\");`\r\n\r\nIt would never find the file, the only files exported by webpack are the bundle.js and the style.css, it looks like the worker loader is not loading anything at all.\r\n\r\nAny help would be very welcomed! Thank you very much in advance!"}}