I came across a helpful post at this link about implementing multiple pages in Vue.js CLI.
After setting up multiple pages, I was excited to test it out. However, I encountered an issue when trying to access the different pages from the URL http://localhost:8080/. No matter what I tried adding after the URL, it kept displaying the same page.
My vue.config.js configuration is as follows:
module.exports = {
lintOnSave: false,
pages: {
index: {
entry: './src/pages/Index.js',
template: './public/index.html',
filename: 'index.html',
title: 'Home',
chunks: [
'chunk-vendors',
'chunk-common',
'index'
]
},
test: {
entry: './src/pages/Test.js',
template: './public/index.html',
filename: 'test.html',
title: 'Test Page',
chunks: [
'chunk-vendors',
'chunk-common',
'test'
]
}
}
};
Despite reloading the server without any errors, I could not get the different pages to display. It seems like I might have overlooked something crucial during the setup process.