How to deploy vue with the same domain name in the tp5 framework without affecting the access of the background admin. The entry file is in the root directory of the project, put the dist folder directly into the root directory, and then let the entry file index/index/index redirect /index.html. Is this possible?
This is how I deployed it. When packaging vue, you can set the output file name and folder. Put the packaged html file in the location corresponding to the view folder in thinkphp, and put the two packaged js and css files. Just go to the set path.
It is recommended to deploy separately for easy maintenance in the future. You can package vue and put it in a subdomain name, and then use nginx reverse proxy to solve cross-domain issues~
It is recommended to use nginx to divert traffic