ktsn/vue-cli-plugin-auto-routing

You may need an additional loader to handle the result of these loaders.

kbhh opened this issue · 7 comments

kbhh commented
Module parse failed: Unexpected token (3:16)
File was processed with these loaders:
 * ./node_modules/vuetify-loader/lib/loader.js
 * ./node_modules/cache-loader/dist/cjs.js
 * ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| 
| {
>   "requiresAuth": true
| }

yea...The author forgot about it

kbhh commented

I did go through all the issues but I didn't find any solution that fixes the problem. And I am using
"vue-loader": "^15.7.2",
Can You Please go through it or reproduce an example of how you use it. Its really great plugin but I am stuck here.

ktsn commented

The workaround is written in #4.

ktsn commented

The cause of this error is because there is vuetify-loader in the chain which is noop for this custom block. Then it breaks the assumption in vue-loader which is "if no loader is assigned for the custom block, then ignore it". I had added cache-loader in the ignore list when #4 was filed to fix this issue (cache-loader was culprit at that moment), but I don't think we can add vuetify-loader (and every possible culprit) for this error.

I'll end up adding dummy loader in vue-cli-plugin-auto-routing to avoid this.

Do you know of anything I can do in vuetify-loader to prevent this?

ktsn commented

I'm not sure if we can do this but to exclude custom blocks from matching if vuetify-loader does nothing for them?