Skip to content

Instantly share code, notes, and snippets.

@burnedikt
Created May 27, 2020 09:33
Show Gist options
  • Save burnedikt/1f6bc56be74dd4ef2f36027dd70efb7f to your computer and use it in GitHub Desktop.
Save burnedikt/1f6bc56be74dd4ef2f36027dd70efb7f to your computer and use it in GitHub Desktop.
Using History API with webpack-dev-server
module.exports = {
// ...
output: {
// required for routing to work properly (https://stackoverflow.com/a/56601922/1142028)
publicPath: '/',
},
devServer: {
// required for routing to work properly (https://stackoverflow.com/a/61715643/1142028)
historyApiFallback: true,
// ...
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment