- ask for help, the website cannot run after vuecli is packaged.
my directory in the development is also very simple, the source code is under src, all other static resources are placed in static, and static is full of pictures and json static files
.
v then because I need to deploy the website to a directory similar to www.baidu.com/you163 in the server root directory, and then modify the webpack configuration, change the build: assetsPublicPath in config/index.js to assetsPublicPath: / you163/", background is done with nodejs+express, and then throw all the generated index.html+static directories into the / you163 directory of the static resources set by express.static.
v now I visit the http://www.ych1987.xyz/you163/ website blank. F12 checks that the network request has only three JS files in the dist/js directory generated by webpack: app, manifest, vendor and app.css generated by dist/css. These four requests are normal, but there are no network errors and no other scarlet letter requests on the console.
v another point of doubt is that the spa website I made through vuecli can access the pages in the vue route through http://localhost:8080/cart. If the deployment on the server is normal, can I access it through http://www.ych1987.xyz/you163...? Of course, the current deployment of problematic access / cart address returns the error Cannot GET / you163/cart of express, or do I need to modify the code of the background nodejs?
Thank you first! ~ *