文章詳情頁
javascript - npm run build后調用api返回index.html
瀏覽:141日期:2023-08-20 16:44:11
問題描述
vue項目打包后生成static和index.html,然后配置nginx指向index.html,調用api的時候卻返回index.html的內容
開發的時候不會出現這樣的問題,vue里面配置了proxyTable轉發api到3000端口,nginx也需要配置轉發api嗎?
問題解答
回答1:你nginxlocation配置有問題咯
location / { index index.html; }
標簽:
JavaScript
相關文章:
排行榜
