<!DOCTYPE html> <html lang=en> <head> <title>test</title> <link href=https://www.jb51.net/static/css/app.0b79487b.css rel=preload as=style> <link href=https://www.jb51.net/static/js/app.695b7ccc.js rel=preload as=script> <link href=https://www.jb51.net/static/js/chunk-vendors.e7ac9ff2.js rel=preload as=script> <link href=https://www.jb51.net/static/css/app.0b79487b.css rel=stylesheet> </head> <body> <div id=app></div> <script src=https://www.jb51.net/static/js/chunk-vendors.e7ac9ff2.js></script> <script src=https://www.jb51.net/static/js/app.695b7ccc.js></script> </body> </html>
七、设置为../时,部署后请求路径:
// vue.config.js module.exports = { publicPath: '../', }
<!DOCTYPE html> <html lang=en> <head> <title>test</title> <link href=https://www.jb51.net/css/app.0b79487b.css rel=preload as=style> <link href=https://www.jb51.net/js/app.67ace555.js rel=preload as=script> <link href=https://www.jb51.net/js/chunk-vendors.e7ac9ff2.js rel=preload as=script> <link href=https://www.jb51.net/css/app.0b79487b.css rel=stylesheet> </head> <body> <div id=app></div> <script src=https://www.jb51.net/js/chunk-vendors.e7ac9ff2.js></script> <script src=https://www.jb51.net/js/app.67ace555.js></script> </body> </html>
到此这篇关于vue-cli设置publicPath小记的文章就介绍到这了,更多相关vue-cli设置publicPath内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
您可能感兴趣的文章: