How to tell webpack dev server to serve index.html for any route

后端 未结 10 2084
心在旅途
心在旅途 2020-11-28 22:00

React router allows react apps to handle /arbitrary/route. In order this to work, I need my server to send the React app on any matched route.

But webpa

10条回答
  •  盖世英雄少女心
    2020-11-28 22:43

    For me I had dots "." in my path e.g. /orgs.csv so I had to put this in my webpack confg.

    devServer: {
      historyApiFallback: {
        disableDotRule: true,
      },
    },
    

提交回复
热议问题