Refused to execute script from because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled

后端 未结 7 1160
误落风尘
误落风尘 2020-12-17 16:25

I am trying to setup react routing which works when I click on something on my site the route works, however if I open a new tab and copy that url. I get

Ref         


        
7条回答
  •  半阙折子戏
    2020-12-17 16:49

    Just edit webpack config by editing this:

        devServer: {
                     historyApiFallback: true
                   }
    

    And also add this to public/index.html:

         
    

    This should do the trick..

提交回复
热议问题