Skip to content

fix: add route-meta block loader to avoid vue-loader error #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ''
}