反应webpack应用程序经常在重新加载后获得一个空白页面

时间:2017-04-07 14:53:09

标签: reactjs intellij-idea webpack

我的reactjs应用程序目前正在运行webpack。我有问题,当我保存intellij中的更改时,网站将被重新编译。但没有再次加载

当我在url localhost:8080 / dashboard / new下重新加载但在控制台中出现错误的白页:

all:32 GET http://localhost:8080/dashboard/bundle.js 

我必须使用root url http://localhost:8080手动重新加载页面以重新搜索分页。

可能是什么问题?

enter image description here

1 个答案:

答案 0 :(得分:0)

我的解决方案是:

class Processes extends React.Component {
    render() {
        return (
            <div>
                <Route path={`${this.props.match.url}/new`} component={ProcessesNew} />
                <Route path={`${this.props.match.url}`} exact component={ProcessesAll} />
            </div>
        )
    }
}

export default Processes;