whenever I click the 'reload' button on my browser during my ReactJS development, my page turns up blank and I have to go back to the base URL and start all over. May I know what I can do to keep some sort of 'history'?
I am using React-Router v4
webpack.config.js
devServer: {
historyApiFallback: {
disableDotRule: true,
index: 'build/index.html
}
}
My devServer has no output properties, only in the prodConfig:
output: {
path: path.join(_dirname, '/build'),
filename: '[name].[hash].bundle.js',
publicPath: '/work/'
}
Directory:
/
- src
- index.html
- webconfig.js
Cheers.
*Edit: added webpack code snippet