We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1204381 commit fc2ba27Copy full SHA for fc2ba27
lib/plugin.js
@@ -91,13 +91,15 @@ class VueLoaderPlugin {
91
// otherwise RuleSet throws error if no option for a given ref is found.
92
if (vueRule.loader || vueRule.loaders) {
93
vueRule.options = { ident }
94
- } else if (vueRule.use) {
+ } else if (Array.isArray(vueRule.use)) {
95
const use = vueRule.use[vueLoaderUseIndex]
96
if (typeof use === 'string') {
97
vueRule.use[vueLoaderUseIndex] = { loader: use, options: { ident }}
98
} else {
99
use.options = { ident }
100
}
101
+ } else if (typeof vueRule.use === 'string') {
102
+ vueRule.use = [{ loader: vueRule.use, options: { ident }}]
103
104
throw new Error(
105
`VueLoaderPlugin Error: this should not happen. Please open an issue ` +
0 commit comments