score:1
i had a similar issue when using a publicpath
other than ''
, which i solved by adding a proxy entry to the devserver
options:
devserver: {
// ... rest of options
proxy: {
'/mypublicpath/*': {
target: 'http://localhost:8080/',
pathrewrite: { '^/mypublicpath': '' },
}
}
other than that, make sure both output.publicpath
and devserver.publicpath
is set and equal.
hope this helps!
score:1
i had a similar issue. the dev server kept trying to load bundle.js
from the directory relative to the url. my publicpath
is '/'
, and, unfortunately, the other answer did not help. i solved the issue like this:
devserver: {
// ... other options
historyapifallback: {
rewrites: [
{ from: /^.*\/bundle\.js$/, to: '/bundle.js' },
]
}
}
Source: stackoverflow.com
Related Query
- Enable single page app react hot reload webpack
- enable hot reload for vite react project instead of page reload
- React create app hot reload is not always working on linux
- Docker Create react app hot reload not working
- React + Webpack HMR is refreshing the page (not hot loading)
- Hitting Back button in React app doesn't reload the page
- structure of a Backbone and React single page app
- How to reload a page (state) in a react app
- Webpack dev middleware react hot reload too slow
- Hot Reload is not working in my React App
- Yarn Workspaces And Webpack Hot Module Reloading React App
- React hot reload not working with webpack 4
- Serving a static html page from a single page react app with react router
- Keeping Google login persistent on reloading single page react app
- Webpack 4 hot reload not working with React TypeScript
- React Route does not work - Single page app
- My React 18 app does not reload automatically I try to click on the create new project button does not work unless I refresh the page manually
- React Router App gets 404 on reload of subpage - serverless, no webpack
- routesv6 react-router-dom Enable vertical scrolling on a single page app
- Is it possible to hot reload a React app after copying built files from a React container to an NGINX container?
- Unable to make api calls from React Single Page app
- React Single Page app with browserHistory possible?
- why the webpack build react app home page stay blank
- Next.js / React single page app needs urls for each item
- Adding underline to current page section in single page react app with Chakra.ui
- Double reload of the page when react app updates state
- How to create multiple page app using react
- Why IE 11 display blank page rendering react app
- Django, ReactJS, Webpack hot reload
- React app error: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS
More Query from same tag
- Not able to listen for data changes from API
- How to add scroll bar for React bootstrap DropDown?
- React Application Unit Testing
- Mocking @material-ui/pickers in Jest
- When treeselect has null value it won't show
- React Router - Path with :id is not working correctly for component wrapped by HOC
- React Native Inset Shadow Effect
- How to merge similar custom hooks into one custom hooks
- How do I improve Redux's performance when updating fast-moving UI state?
- What is the "..." syntax used in both React and GrahpQL? Is it more general Javascript?
- Authenticity token only gets set after form submission in React component which throws an error in Rails
- Jest tests on React components: Unexpected token "<"
- How to add ```Context``` with routes set up?
- How do I correctly configure eslint to lint JSX files in SublimeText3
- get only the unique value of an array
- React Typescript onChange function typeError
- React : how to prevent escaping in data-attribute
- React. How to use the keys in setState with array indexes?
- How to allow storybook to build even with TypeScript (type) errors?
- How to use csrf_token in Django RESTful API and React?
- How to stop propagation outside item rows
- React refs: Cannot read property 'focus' of null
- React - setting input prop from defaultValue to value triggers infinite loop
- What's the difference between useState and useImmer?
- I am trying to install nginx in Ubuntu 16.04, but I get an error about locale settings
- How to run common code before all onclick handlers in a React app? (to work around Safari middle-button click bug)
- creating a Boolean flag for onclick method
- React state not working on drop down menu to hide it again
- How can I convert input value?
- Using enzyme, simulating keydown event is not working on element where event is dynamically added to element