Skip to content

Commit

Permalink
feat: support being used on files not ending with .vue
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 6, 2018
1 parent 65fbde0 commit 5a9ee91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ function cloneRule (rule, normalizedRule) {
const res = Object.assign({}, rule, {
test: resource => {
currentResource = resource
return /\.vue$/.test(resource)
return true
},
resourceQuery: query => {
const parsed = qs.parse(query.slice(1))
if (parsed.vue == null) {
return false
}
const { resource, resourceQuery } = normalizedRule
if (resource && parsed.lang == null) {
return false
Expand Down

0 comments on commit 5a9ee91

Please sign in to comment.