Я думаю, проблема не в конфигурации реактивного маршрутизатора, а в том, что мой index.html не может обнаружить мой скрипт? Это моя ошибка:
Не удалось загрузить ресурс: сервер ответил статусом 404 (не найден)
это мой код конфигурации веб-пакета:
const compiler = webpack({
entry: ['whatwg-fetch', path.resolve(__dirname, 'js', 'index.js')],
module: {
loaders: [
{
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.js$/,
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
}
],
},
output: {filename: 'app.js', path: '/'},
});
const app = new WebpackDevServer(compiler, {
contentBase: '/public/',
proxy: {'/graphql': `http://localhost:${GRAPHQL_PORT}`},
publicPath: '/js/',
stats: {colors: true},
historyApiFallback: {
index: 'index.html'
}
});
и мой index.html
<!doctype html>
<html lang="en" data-framework="relay">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.11/semantic.min.css">
<title>Relay • TodoMVC</title>
</head>
<body>
<div id="root"></div>
<script type="text/javascript">
// Force `fetch` polyfill to workaround Chrome not displaying request body
// in developer tools for the native `fetch`.
self.fetch = null;
</script>
<script src="http://localhost:4000/webpack-dev-server.js"></script>
<script src="js/app.js"></script>
</body>
</html>
Помощь?
historyApiFallback
в значение true? - person Govind Rai   schedule 13.08.2017