Adding a public path to the configuration helps webpack understand the real root ( / ) even when you are in subprocesses, for example. /article/uuid
Therefore, reconfigure your web package and add the following:
output: { publicPath: "/" } devServer: { historyApiFallback: true }
Without publicPath resources may not load properly, only index.html.
Tested on Webpack 4.6
Most of the config (just for a better picture):
entry: "./main.js", output: { publicPath: "/", path: path.join(__dirname, "public"), filename: "bundle-[hash].js" }, devServer: { host: "domain.local", https: true, port: 123, hot: true, contentBase: "./public", inline: true, disableHostCheck: true, historyApiFallback: true }
Jurosh May 04 '18 at 16:18 2018-05-04 16:18
source share