Skip to content

Commit

Permalink
fix: don't try to load custom blocks in .vue files
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Jul 11, 2020
1 parent 1f7b93b commit 86751a1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
4 changes: 4 additions & 0 deletions dev/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
<script>
export default {}
</script>

<docs>
This is the documentation for App.vue
</docs>
28 changes: 20 additions & 8 deletions lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ class VuetifyLoaderPlugin {
)
}

vueRule.use.unshift({
loader: require.resolve('./loader'),
options: {
match: this.options.match || [],
attrsMatch: this.options.attrsMatch || []
}
})

if (this.options.progressiveImages) {
const vueLoaderOptions = vueRule.use.find(isVueLoader).options
vueLoaderOptions.compilerOptions = vueLoaderOptions.compilerOptions || {}
Expand Down Expand Up @@ -126,6 +118,26 @@ class VuetifyLoaderPlugin {
}
}

vueRule.oneOf = [
{
resourceQuery: '?',
use: vueRule.use
},
{
use: [
{
loader: require.resolve('./loader'),
options: {
match: this.options.match || [],
attrsMatch: this.options.attrsMatch || []
}
},
...vueRule.use
]
},
]
delete vueRule.use

compiler.options.module.rules = rules
}
}
Expand Down

0 comments on commit 86751a1

Please sign in to comment.