As a nuxt module author I want to specify a webpack loader only for a given route component using webpack inline loaders
In order to apply custom transformations to files that can not be explicitly targeted via webpack config. (for example when the same file is loaded twice with different loaders).
The component path is made relative by utils#relativeTo which causes a component path like my-epic-loader?foo=bar!./pages/epic.vue
to be prefixed like ../my-epic-loader?foo=bar!./pages/epic.vue
- webpack can not handle this.
I'd propose to modify relativeTo to split the path by !
, then make it relative and prepend the loader again.
I'd be happy to provide a PR
<!--cmty--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c7042">#c7042</a>)</em></sub></div>