score:3
i had this problem.
solved it by adding the following to my webpack.config.js
devserver: {
historyapifallback: true,
contentbase: path.join(__dirname, "dist"), // not related but important
}
you can also toggle this option via the command-line: https://webpack.github.io/docs/webpack-dev-server.html#the-historyapifallback-option
in my case, i got it working by putting it in the config file.
good luck !
Source: stackoverflow.com
Related Query
- What is the difference between hashHistory and browserHistory in react router?
- Upgrading React-Router and replacing hashHistory with browserHistory
- HashHistory vs. BrowserHistory
- Is there a way to programatically switch to hashHistory from browserHistory when on a webpack dev server?
- Routing via browserHistory when using hashHistory doesnt appear to work
- react-router v4 - browserHistory is undefined
- Where's hashHistory in React Router v4?
- Removing react-router browserHistory change listener
- React-router with BrowserRouter / browserHistory doesn't work on refresh
- How to mock browserHistory in unit test environment?
- React-router 2.0 browserHistory doesn't work when refreshing
- Get current page path from react-routers browserHistory object
- React router with browserHistory goes to server on every URL change
- Usign react-router-dom, how can I access browserHistory object from outside a React component?
- browserHistory undefined with React Router 2.00 release candidates
- react-router browserHistory removeListen?
- React Router browserHistory works on local, not on production
- Minimum nodejs server setup needed for React using react-router and browserHistory
- React Router browserHistory push and anchors
- react route using browserhistory changes url but nothing happens
- Electron app not working with React-Router using browserHistory
- BrowserHistory not working for react-router
- ReactJS URL Query String. BrowserHistory not working
- Remove queryKey from hashHistory react-router-redux
- React Router passing params to browserHistory from table row
- Access browserHistory in redux
- How to deploy browserHistory based React applications to Azure App Service?
- How to make browserHistory work with webpack react
- browserHistory not Moving to New Component in React
- Enzyme: Test fails on BrowserHistory function
More Query from same tag
- ReactJs unable to get react-rout params.It gives undefined
- Convert date range object into ISO-8601 format using moment.js
- How remove an item from the Typeahead React multiselect?
- react firebase authentication with apollo graphql
- open window using react-router v4's this.props.history.push?
- Using a regular javascript library inside a React component
- React js google map react-google-maps-api add StandaloneSearchBox
- How can I implement in styled components and interpolations with emotion theming?
- One of attribute lost data when assign javascript object
- GRADLE tasks run configuration
- How to push changes in package.json of kentico-cloud-delivery of node_modules into bitbucket
- How to pass props to child React component?
- About Redux-thunk, if a handler dispatches a function to be called, why not call it directly?
- Webpack code splitting to asynrounously load react components within a library
- React-router New page renders and previous component stays on page after doing browserhistory.push('/path')
- Material ui - change the height of the Accordion
- How to center grid elements in a container MUI?
- Conditional styling with Styled Components
- Fail to compile ternary expression in React component render
- How to update the State on a DnD Component
- React setState variable issue
- How to Integrate third party libraries into React JS
- Proxy inside package.json must be a string react issue
- Next-Pwa not working on production server such as Nginx
- Is it correct to use two different useState hook to store an array and a filtered array for passing to components?
- Change field dynamically in ReactJs
- Why we need to bind function in React Native?
- Control Arduino using Express JS server and Johnny-Five
- Material UI React - Autocomplete - How to reset the internal state
- TypeError: Cannot read property 'map' of null -> Because of localStorage?