Closed zuoye520 closed 7 years ago
已增加分支 mpa1-history-mode-router
关键配置:
// dev.js
historyApiFallback: {
rewrites: [
{ from: /^\/web/, to: '/web/index.html' },
{ from: /^\/admin/, to: '/admin/index.html' }
]
}
// web/router.js
{
base: process.env.NODE_ENV === "production" ? '/' : '/web/',
mode: 'history',
}
// admin/router.js
{
base: process.env.NODE_ENV === "production" ? '/' : '/admin/',
mode: 'history',
}
http://localhost:8080/web.html#/css
需要支持history模式怎么解决?