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?
曾师傅2021-01-20 01:47:02
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.
灭绝师太2021-01-18 09:23:06
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~