- 需要指定生成dist目录,加个app,astilection好像默认给加了个app目录
- 需要指定公用路径
- route需要使用hash路由,history路由不行
- eslint在运行的时候会报错,需要去掉
vue.config.js
module.exports = {
publicPath: '',
outputDir: 'dist/app',
devServer: {
host: "0.0.0.0",
port: 9001,
}
lintOnSave: false
}
router.js
const routerHistory = createWebHashHistory()
const baseUrl = "/platform"
const Router = createRouter({
history: routerHistory,
...........