We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f86e97 commit a0959e6Copy full SHA for a0959e6
src/router/index.js
@@ -10,7 +10,7 @@ const views = []
10
const vueFiles = require.context('@/views', true, /page\.vue$/)
11
vueFiles.keys().forEach(key => {
12
const component = vueFiles(key).default
13
- const routePath = path.dirname(component.__source).replace(/^src\/views\//, '')
+ const routePath = path.relative('src/views', path.dirname(component.__source))
14
const routeName = routePath.replace(path.sep, '-')
15
views.push({
16
name: routeName,
0 commit comments