I have a multipage Vue.js application with working pages on domain/legal; domain/submit; etc. I've implemented that with the help of Vue.js' pages (i.e. customizing vue.config.js
)
In other words, I'm all good making the above work.
I'm now trying to implement further nested pages under a new subdirectory level (additionally to the ones I already have as per above). i.e.
- domain/org/profile1
- domain/org/profile2
- domain/org/profile3
Any way to make this work by customizing vue.config.js
?
Current attempt vue.config.js
code:
module.exports = {
pages: {
index: {
entry: "./src/pages/home/main.js",
template: "public/index.html",
title: "Home",
chunks: ["chunk-vendors", "chunk-common", "index"],
},
legal: {
entry: "./src/pages/legal/main.js",
template: "public/index.html",
title: "Legal",
chunks: ["chunk-vendors", "chunk-common", "legal"],
},
submit: {
entry: "./src/pages/submit/main.js",
template: "public/index.html",
title: "Submit",
chunks: ["chunk-vendors", "chunk-common", "submit"],
},
org: {
digitalocean: {
entry: "./src/pages/org/digitalocean/main.js",
template: "public/index.html",
title: "Digital Ocean",
chunks: ["chunk-vendors", "chunk-common", "digitalocean"],
},
},
},
};
And file structure:
src
-assets
-components
-pages
--home
App.vue
main.js
--legal
App.vue
main.js
--submit
App.vue
main.js
--org
---digitalocean
App.vue
main.js
This gives me the error:
Invalid options in vue.config.js: child "pages" fails because [child "org" fails because ["org" must be a string, "org" must be an array, child "entry" fails because ["entry" is required]]]
Pointers will be extremely welcome on how to make the nested pages work by modifying vue.config.js!
Invalid options in vue.config.js: child "pages" fails because [child "pages" fails because ["pages" must be a string, "pages" must be an array, child "entry" fails because ["entry" is required]]]
– Dabble