Skip to content

Commit 86751a1

Browse files
committed
fix: don't try to load custom blocks in .vue files
1 parent 1f7b93b commit 86751a1

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

dev/src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@
1616
<script>
1717
export default {}
1818
</script>
19+
20+
<docs>
21+
This is the documentation for App.vue
22+
</docs>

lib/plugin.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ class VuetifyLoaderPlugin {
3232
)
3333
}
3434

35-
vueRule.use.unshift({
36-
loader: require.resolve('./loader'),
37-
options: {
38-
match: this.options.match || [],
39-
attrsMatch: this.options.attrsMatch || []
40-
}
41-
})
42-
4335
if (this.options.progressiveImages) {
4436
const vueLoaderOptions = vueRule.use.find(isVueLoader).options
4537
vueLoaderOptions.compilerOptions = vueLoaderOptions.compilerOptions || {}
@@ -126,6 +118,26 @@ class VuetifyLoaderPlugin {
126118
}
127119
}
128120

121+
vueRule.oneOf = [
122+
{
123+
resourceQuery: '?',
124+
use: vueRule.use
125+
},
126+
{
127+
use: [
128+
{
129+
loader: require.resolve('./loader'),
130+
options: {
131+
match: this.options.match || [],
132+
attrsMatch: this.options.attrsMatch || []
133+
}
134+
},
135+
...vueRule.use
136+
]
137+
},
138+
]
139+
delete vueRule.use
140+
129141
compiler.options.module.rules = rules
130142
}
131143
}

0 commit comments

Comments
 (0)