Skip to content

Commit

Permalink
fix: remove .vue from fake resourcePath to avoid double match
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 21, 2018
1 parent d04f9cf commit 7c5b6ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function cloneRule (rule, normalizedRule, vueUse) {
if (resource && parsed.lang == null) {
return false
}
if (resource && !resource(`${currentResource}.${parsed.lang}`)) {
const fakeResourcePath = `${currentResource.replace(/\.vue$/, '')}.${parsed.lang}`
if (resource && !resource(fakeResourcePath)) {
return false
}
if (resourceQuery && !resourceQuery(query)) {
Expand Down

0 comments on commit 7c5b6ac

Please sign in to comment.