久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      react打包圖片路徑錯(cuò)誤怎么辦

      react打包圖片路徑錯(cuò)誤的解決辦法:1、把build文件夾直接放到IIS上;2、修改index.html里面的引用資源,把“/static”前面的“/”符號(hào)去掉即可訪問到頁面內(nèi)容。

      react打包圖片路徑錯(cuò)誤怎么辦

      本教程操作環(huán)境:Windows10系統(tǒng)、react18.0.0版、Dell G3電腦。

      react打包圖片路徑錯(cuò)誤怎么辦?

      react打包后圖片和資源路徑錯(cuò)誤的解決方法

      執(zhí)行打包程序后yarn run build

      會(huì)看到多了一個(gè)build的文件夾。只需要把build文件夾部署到服務(wù)器即可訪問。如果直接打開index.html就會(huì)報(bào)錯(cuò),圖片和資源加載不到。

      我直接把它放到IIS上,做測(cè)試后是沒有問題。

      react打包圖片路徑錯(cuò)誤怎么辦

      當(dāng)然,如果你非用在本地訪問,就手動(dòng)把index.html里面的引用資源理解修改一下即可。也就是把【 /static 】前面的【/】 去掉,也可以訪問到頁面內(nèi)容。

      推薦學(xué)習(xí):《react視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)