React Router DOM not working correctly on Amplify Console AWS

前端 未结 2 1599
悲哀的现实
悲哀的现实 2020-12-29 10:54

I have deployed react app on Amplify Console following their documentation. The site is deployed and running fine, I am able to navigate using links but when I try to land t

相关标签:
2条回答
  • 2020-12-29 10:57

    I found that using these settings, as mentioned here and here.

    i.e updating the redirect rule to these settings

    Source address: </^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf)$)([^.]+$)/>
    Target address: /index.html
    Type: 200
    

    0 讨论(0)
  • 2020-12-29 10:58

    Thanks! I would add also |json| the string - it fixes "Manifest: Line: 1, column: 1, Syntax error on Chrome browser" problem:

    Manifest: Line: 1, column: 1, Syntax error on Chrome browser

    0 讨论(0)
提交回复
热议问题