我使用 vue.js 和 vue.config.js 方法创建了一个多页面应用程序我开发它没有问题我创建了一个生产版本我可以访问主页但是我无法访问其他页面,例如关于我们、投资组合等。
可能是什么问题??以及如何解决?是关于 .htacess 的吗?
这是我的 vue.config.js 代码
module.exports = {
pages: {
index: {
entry: './src/pages/Home/main.js',
template: 'public/index.html',
title: 'Welcome to Appclust',
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
about:{
entry: './src/pages/About/main.js',
template: 'public/index.html',
title: 'About us',
chunks: ['chunk-vendors', 'chunk-common', 'about']
},
portfolio:{
entry: './src/pages/Portfolio/main.js',
template: 'public/index.html',
title: 'Portfolio',
chunks: ['chunk-vendors', 'chunk-common', 'portfolio']
},
testimonials:{
entry: './src/pages/Testimonials/main.js',
template: 'public/index.html',
title: 'Testimonials',
chunks: ['chunk-vendors', 'chunk-common', 'testimonials ']
},
careers:{
entry: './src/pages/Careers/main.js',
template: 'public/index.html',
title: 'Careers',
chunks: ['chunk-vendors', 'chunk-common', 'careers']
},
contact:{
entry: './src/pages/Contact/main.js',
template: 'public/index.html',
title: 'Contact',
chunks: ['chunk-vendors', 'chunk-common', 'contact']
}
}
}
生产文件