Skip to content

Commit

Permalink
fix: add route-meta block loader to avoid vue-loader error (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn authored Jan 28, 2020
1 parent 6e82c90 commit b37e7ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@ module.exports = (api, options) => {
webpackConfig
.plugin('vue-auto-routing')
.use(VueAutoRoutingPlugin, [pluginOptions])

// prettier-ignore
webpackConfig.module
.rule('route-meta')
.post()
.resourceQuery(/blockType=route-meta/)
.use('route-meta')
.loader('vue-cli-plugin-auto-routing/route-meta-loader')
})
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Vue CLI plugin that provides auto routing feature",
"files": [
"index.js",
"route-meta-loader.js",
"generator"
],
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions route-meta-loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function() {
return ''
}

0 comments on commit b37e7ca

Please sign in to comment.