{"action":"opened","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1289","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1289/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1289/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1289/events","html_url":"https://github.com/webpack/webpack/issues/1289","id":96925396,"number":1289,"title":"Query to aliased resource with loader","user":{"login":"kisenka","id":2714771,"avatar_url":"https://avatars.githubusercontent.com/u/2714771?v=3","gravatar_id":"","url":"https://api.github.com/users/kisenka","html_url":"https://github.com/kisenka","followers_url":"https://api.github.com/users/kisenka/followers","following_url":"https://api.github.com/users/kisenka/following{/other_user}","gists_url":"https://api.github.com/users/kisenka/gists{/gist_id}","starred_url":"https://api.github.com/users/kisenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisenka/subscriptions","organizations_url":"https://api.github.com/users/kisenka/orgs","repos_url":"https://api.github.com/users/kisenka/repos","events_url":"https://api.github.com/users/kisenka/events{/privacy}","received_events_url":"https://api.github.com/users/kisenka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-23T23:26:17Z","updated_at":"2015-07-23T23:26:17Z","closed_at":null,"body":"How can I pass [query](http://webpack.github.io/docs/loaders.html#resourcequery) to aliased resource which is processed by custom loader?\r\nFollowing setup doesn't work:\r\n\r\n**webpack.config.js**\r\n```js\r\nresolve: {\r\n  alias: {\r\n    'super-alias': path.join(__dirname, 'lib', 'my-module.js')\r\n  }\r\n},\r\nmodule: {\r\n  loaders: [\r\n    {\r\n      test: /my-module/,\r\n      loader: path.resolve(__dirname, 'lib', 'loaders', 'my-custom-loader.js')\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nEntry point\r\n```js\r\nrequire('super-alias?qwe=123');\r\n```\r\n\r\n**my-custom-loader**\r\n```js\r\nmodule.exports = function (content, sourceMap) {\r\n  console.log(this.resourceQuery); // null\r\n};\r\n```"}}