Vue project construction

our front-end construction method is as follows: after the vue project build, the dist is sent to the server tomcat to restart. Now you want to send the two packaged project An and B to unified tomcat webapps and webapps- > projectB respectively. After the build restart, you can only access project A under webapps. How can project B access it at the same time?

base is configured in vue-router:"/ projectB/", is invalid

The

base document is introduced as follows:
the base path of the application. For example, if the entire single-page application service is under / app/, then base should be set to "/ app/"

May.27,2022

should be configured in tomcat. You are deployed on the same server as the backend.


is the right way to pack.
if the server path is in projectB, the project path base can be changed to projectB packaging.


this problem was solved last week as follows:
the front-end project is based on Vue CLI 3:
1) publicPath is configured in vue.config.js, such as publicPath:'/ projectB/';
2) vue-router routing configuration, such as base:'/ projectB/';
3) Host configuration in server.xml under tomcat:
< Context path= "projectA" docBase= "projectA/dist" reloadable= "true" / >
< Context path= "projectB" docBase= "projectB/dist" reloadable= "true" / >

Note:
1)
webapps->
projectA-> dist-> build file
projectB-> dist-> build file
2) the publicPath attribute in vue.config.js must be valid in @ vue/cli-service version ^ 3.2.0


change base to. /

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b41bc1-2bb03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b41bc1-2bb03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?