App running at:
- Local: http://localhost:9527/
- Network: http://172.16.1.129:9527/
Note that the development build is not optimized.
To create a production build, run npm run build.
location ^~ /vue
{
proxy_pass http://172.16.1.129:9527/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
}
1.
publicPath: '/',
outputDir: 'dist',
assetsDir: 'static',
这样会找不到js文件
2.
publicPath: './',
outputDir: 'dist',
assetsDir: 'static',
3.
publicPath: '/vue/',
outputDir: 'dist',
assetsDir: 'static',
2和3报错:
Uncaught SyntaxError: Unexpected token '<' (at chunk-vendors.js:1:1)
单独一个项目目录,然后软连接😄
然后怎么配置nginx?
直接nginx访问vue项目index不就可以了吗
自身问题,原来是CDN缓存了。。。 😂