{"action":"created","issue":{"url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/29","repository_url":"https://api.github.com/repos/webpack-contrib/raw-loader","labels_url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/29/comments","events_url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/29/events","html_url":"https://github.com/webpack-contrib/raw-loader/issues/29","id":230385102,"number":29,"title":"Does not work with a dynamic path","user":{"login":"stephan-v","id":2384912,"avatar_url":"https://avatars2.githubusercontent.com/u/2384912?v=3","gravatar_id":"","url":"https://api.github.com/users/stephan-v","html_url":"https://github.com/stephan-v","followers_url":"https://api.github.com/users/stephan-v/followers","following_url":"https://api.github.com/users/stephan-v/following{/other_user}","gists_url":"https://api.github.com/users/stephan-v/gists{/gist_id}","starred_url":"https://api.github.com/users/stephan-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephan-v/subscriptions","organizations_url":"https://api.github.com/users/stephan-v/orgs","repos_url":"https://api.github.com/users/stephan-v/repos","events_url":"https://api.github.com/users/stephan-v/events{/privacy}","received_events_url":"https://api.github.com/users/stephan-v/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-22T12:49:40Z","updated_at":"2017-06-11T21:06:50Z","closed_at":null,"body":"Whenever I try to use this with a dynamic require path it fails. Is this normal are can this be circumvented somehow?\r\n\r\nFor example these will fail:\r\n\r\n```\r\nvar name = 'arrow.svg';\r\nrequire('!!raw-loader!public/images/svg/ + name');\r\n```\r\n\r\n```\r\nvar name = 'arrow.svg';\r\nrequire(`!!raw-loader!public/images/svg/${name}`);\r\n```\r\n\r\nWhile this works fine:\r\n\r\n```\r\nrequire('!!raw-loader!public/images/svg/arrow.svg');\r\n```\r\n\r\nThe error I get is:\r\n\r\n>  ERROR  Failed to compile with 1 errors                                                                                                                                                                    2:45:45 PM\r\n> \r\n> This dependency was not found:\r\n> \r\n> * !!raw-loader!public/images/svg/ in ./~/babel-loader/lib?{\"cacheDirectory\":true,\"presets\":[[\"env\",{\"modules\":false,\"targets\":{\"browsers\":[\"> 2%\"],\"uglify\":true}}]]}!./~/vue-loader/lib/selector.js?type\r\n> =script&index=0!./resources/assets/js/components/svg/SvgInline.vue\r\n> \r\n> To install it, you can run: npm install --save !!raw-loader!public/images/svg/\r\n"},"comment":{"url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/comments/307656870","html_url":"https://github.com/webpack-contrib/raw-loader/issues/29#issuecomment-307656870","issue_url":"https://api.github.com/repos/webpack-contrib/raw-loader/issues/29","id":307656870,"user":{"login":"kedrzu","id":2473784,"avatar_url":"https://avatars2.githubusercontent.com/u/2473784?v=3","gravatar_id":"","url":"https://api.github.com/users/kedrzu","html_url":"https://github.com/kedrzu","followers_url":"https://api.github.com/users/kedrzu/followers","following_url":"https://api.github.com/users/kedrzu/following{/other_user}","gists_url":"https://api.github.com/users/kedrzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kedrzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kedrzu/subscriptions","organizations_url":"https://api.github.com/users/kedrzu/orgs","repos_url":"https://api.github.com/users/kedrzu/repos","events_url":"https://api.github.com/users/kedrzu/events{/privacy}","received_events_url":"https://api.github.com/users/kedrzu/received_events","type":"User","site_admin":false},"created_at":"2017-06-11T21:06:50Z","updated_at":"2017-06-11T21:06:50Z","body":"Webpack resolves dependencies at build time, so you simply cannot do it at runtime."}}
{"actor":{"display_login":"kedrzu"}}