关于vue打包之后index.html显示空白的解决方案和部署在tomcat上

244 阅读1分钟

1,修改项目目录下的vue.config.js

module.exports = {
  publicPath: './',
}

image.png

2,router/index.js修改如下 mode='hash'

image.png

3,打包

npm run build

4,把打包的项目放在webapps这个文件下,我打包的名字叫dist

image.png 5,启动toncat

image.png

6,完成!