Serve another(standalone) page or static file in website built with react

前端 未结 6 1617
陌清茗
陌清茗 2021-02-02 09:53

I have a website built with react, which uses react-router. For some route I want to serve another page or static file, but since all request are forwarded to react router, its

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 10:03

    How about simply put your statics files like sitemap.xml inside React's public folder along side index.html.

    I thinks this is the easiest way.

提交回复
热议问题