Description
Version
15.0.0
Reproduction link
https://github.com/Kovensky/vue-loader-bug
Steps to reproduce
Having any rule, in your webpack config, that specifies a resource
function, causes the config to fail validation, because the vue-loader plugin will unconditionally inject a test
function in it. test
, include
and exclude
are mutually incompatible with resource
(webpack works internally by generating a resource
function that validates the test
/include
/exclude
).
What is expected?
A rule with resource
should be passed through, preferably unmodified.
What is actually happening?
Error: Rule can only have one resource source (provided resource and test + include + exclude)
Why does CodeSandbox not let me edit the webpack config for a vue-loader bug report? That makes it not very useful, at least for vue-loader.
As for background, I'm trying to write a config that works on a mixed js-ts project; and unless some measures are taken to not pass in-.vue js to ts-loader, they will be parsed and compiled as if they are typescript. A workaround is to just not pass anything js to ts-loader, but that then removes type checking from // @ts-check
files.
EDIT: vue-issues does not escape +
so any +
you write in the issue template gets converted into a space 🤷♀️