Commit a3af6b3a authored by Evan You's avatar Evan You

feat: support declaring rules using .vue.html (ref #1238)

parent a029f770
......@@ -15,14 +15,17 @@ module.exports = class VueLoaderPlugin {
const clone = Object.assign({}, rule)
delete clone.include
const normalized = RuleSet.normalizeRule(clone, {}, '')
return !rule.enforce && normalized.resource && normalized.resource(`foo.vue`)
return !rule.enforce && normalized.resource && (
normalized.resource(`foo.vue`) ||
normalized.resource(`foo.vue.html`)
)
})
const vueRule = rawRules[vueRuleIndex]
if (!vueRule) {
throw new Error(
`[VueLoaderPlugin Error] No matching rule for .vue files found.\n` +
`Make sure there is at least one root-level rule that matches .vue files.`
`Make sure there is at least one root-level rule that matches .vue or .vue.html files.`
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment