{"action":"created","issue":{"url":"https://api.github.com/repos/altano/handlebars-loader/issues/37","labels_url":"https://api.github.com/repos/altano/handlebars-loader/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/altano/handlebars-loader/issues/37/comments","events_url":"https://api.github.com/repos/altano/handlebars-loader/issues/37/events","html_url":"https://github.com/altano/handlebars-loader/issues/37","id":72474374,"number":37,"title":"`require` images","user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"diurnalist","id":796413,"avatar_url":"https://avatars.githubusercontent.com/u/796413?v=3","gravatar_id":"","url":"https://api.github.com/users/diurnalist","html_url":"https://github.com/diurnalist","followers_url":"https://api.github.com/users/diurnalist/followers","following_url":"https://api.github.com/users/diurnalist/following{/other_user}","gists_url":"https://api.github.com/users/diurnalist/gists{/gist_id}","starred_url":"https://api.github.com/users/diurnalist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diurnalist/subscriptions","organizations_url":"https://api.github.com/users/diurnalist/orgs","repos_url":"https://api.github.com/users/diurnalist/repos","events_url":"https://api.github.com/users/diurnalist/events{/privacy}","received_events_url":"https://api.github.com/users/diurnalist/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-05-01T17:01:37Z","updated_at":"2015-05-13T06:00:39Z","closed_at":"2015-05-13T06:00:39Z","body":"Hey.\r\n\r\nWhen running a template through this plugin, stuff like \r\n\r\n```hbs\r\n<h1 id=\"headerYo\">{{name}} is kewl!</h1>\r\n<h2>What is even life</h2>\r\n\r\n<img src=\"../images/cat.jpg\"/>\r\n```\r\n\r\nDoesn't replace the `src` with a require, like `html-loader` does. Is that an option? Images aren't being included.\r\n\r\nI see `inlineRequires`, is that something I can use? If that's the case, #14 would be nice if completed :smile: "},"comment":{"url":"https://api.github.com/repos/altano/handlebars-loader/issues/comments/101523880","html_url":"https://github.com/altano/handlebars-loader/issues/37#issuecomment-101523880","issue_url":"https://api.github.com/repos/altano/handlebars-loader/issues/37","id":101523880,"user":{"login":"altano","id":1009,"avatar_url":"https://avatars.githubusercontent.com/u/1009?v=3","gravatar_id":"","url":"https://api.github.com/users/altano","html_url":"https://github.com/altano","followers_url":"https://api.github.com/users/altano/followers","following_url":"https://api.github.com/users/altano/following{/other_user}","gists_url":"https://api.github.com/users/altano/gists{/gist_id}","starred_url":"https://api.github.com/users/altano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altano/subscriptions","organizations_url":"https://api.github.com/users/altano/orgs","repos_url":"https://api.github.com/users/altano/repos","events_url":"https://api.github.com/users/altano/events{/privacy}","received_events_url":"https://api.github.com/users/altano/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T06:00:38Z","updated_at":"2015-05-13T06:00:38Z","body":"@SimenB, you were really close: you want to specify this instead: `{ test: /\\.hbs$/, loader: 'handlebars!html' }` since, as you pointed out, handlebars-loader returns a function.  handlebars-loader can process the output of html-loader but not the other way around.  And I would actually recommend making the test `test: /\\.hbs\\.html$/` to differentiate from regular handlebars templates, so that you can still process those using just handlebars-loader if you ever need that in the future.\r\n\r\nThis should work as long as html-loader can process your handlebars template, which should work for most templates.\r\n\r\nI added an example to this loader to demonstrate, and it seems to work fine:\r\nhttps://github.com/altano/handlebars-loader/tree/master/examples/html-loader-chaining\r\n\r\nThe output of this example is:\r\n\r\n```javascript\r\nmodule.exports = \"<h1>Alan</h1>\\r\\n<img src=\\\"\" + require(\"../images/cat.jpg\") + \"\\\"/>\";\r\n```\r\n\r\nLet me know if that doesn't work for you."}}