React-router v4 - cannot GET *url*

前端 未结 8 645
梦如初夏
梦如初夏 2020-12-07 14:04

I started to use react-router v4. I have a simple in my app.js with some navigation links (see code below). If I navigate to localhost/voca

8条回答
  •  一生所求
    2020-12-07 14:52

    If you use Webpack check your configuration in part of server configuration for the "contentBase" attribute. You can set by this example:

    devServer: {
        ...
        contentBase: path.join(__dirname, '../')
        ...
    }
    

提交回复
热议问题