vue项目打包后部署的问题

1、vue项目打包后,静态资源默认路径为/static。部署在nginx能正常访问,但是部署在tomcat的ROOT同级目录无法访问静态资源,必须修改路径为./static  (config/index.js中修改),tomcat如果部署在webapps/ROOT下用/static能正常访问。该问题同样存在于react、ng等项目打包之后。

posted @ 2019-08-26 16:40  小彬前端  阅读(1797)  评论(0编辑  收藏  举报