追記: webpack-serve は非推奨となり webpack-dev-server が開発再開しました。新しく始める際はスタックに webpack-serve を採用しないほうがよいでしょう。 実は react あんまり関係ない。webpack-serve でSPAホストする際にフォールバックコンテンツの設定方法でちょっとハマったのでメモ。 実行環境は React.js 開発環境を webpack4 + webpack-serve + babel 7 で作る の流れで作ったものをそのまま利用しています。したがって babel7, webpack4 です。 webpack-serve と react-router react-router-dom をインストールします import React from "react"; import { render } from "react-do