{"action":"opened","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/860","labels_url":"https://api.github.com/repos/webpack/webpack/issues/860/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/860/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/860/events","html_url":"https://github.com/webpack/webpack/issues/860","id":59956567,"number":860,"title":"Custom loader that invokes other loaders","user":{"login":"mlindsten","id":7278260,"avatar_url":"https://avatars.githubusercontent.com/u/7278260?v=3","gravatar_id":"","url":"https://api.github.com/users/mlindsten","html_url":"https://github.com/mlindsten","followers_url":"https://api.github.com/users/mlindsten/followers","following_url":"https://api.github.com/users/mlindsten/following{/other_user}","gists_url":"https://api.github.com/users/mlindsten/gists{/gist_id}","starred_url":"https://api.github.com/users/mlindsten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlindsten/subscriptions","organizations_url":"https://api.github.com/users/mlindsten/orgs","repos_url":"https://api.github.com/users/mlindsten/repos","events_url":"https://api.github.com/users/mlindsten/events{/privacy}","received_events_url":"https://api.github.com/users/mlindsten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-05T14:12:58Z","updated_at":"2015-03-05T14:12:58Z","closed_at":null,"body":"**Hi folks!**\r\n\r\nI'm quite new to webpack (I've been experimenting with it in my spare time for 2-3 months now), but I've already written a couple of plugins and some loaders (maybe I'm misusing it since I need to modify how it works out of the box, but anyway...).\r\n\r\nI'm currently working on a loader that \"combines\" different kinds of content (html, css, etc) based on a specific source file (a vue-component file, if you're curious). After reading blocks of different content from the file, I want my loader to invoke the other loaders defined in the webpack options for each content block, just as if they were separate files of their own, and then continue processing (i.e. combining) the results. Do you follow?\r\n\r\nCurrently my loader works by tricking webpack to think there are different files, but this is messy and it also doesn't work with the dev-server, so I want to improve it by directly invoking the other loaders from my loader.\r\n\r\nI've been digging through the _compiler and _compilation objects available in the loader context, but I feel a little lost. **So, assuming my loader is invoked for `path/to/myfile.vue`, how can I, from my loader, invoke all the loaders that would be invoked for the hypothetical file `path/to/myfile.less`, providing the file contents as a string and getting the resulting script back as a string?**\r\n"}}