Comments (6)
Okay, guys, I figure out the problem. browserHistory does not work on prod
import { browserHistory } from 'react-router';
const history = syncHistoryWithStore(browserHistory, store);
change with this:
import { hashHistory } from 'react-router';
const history = syncHistoryWithStore(hashHistory, store);
from webpack-react-redux.
Which node version?
Can you upgrade and try again.
from webpack-react-redux.
Well... my command build work fine, but when i'll run index.html
it not render in browser.
from webpack-react-redux.
Any suggest about this issue?
from webpack-react-redux.
hey @cemarguvanli
thanks for your solution, it work for me :)
from webpack-react-redux.
It should work with browserHistory if you run the dist folder on a server. From your screenshot I can see you are just navigating to it so it's not going to work that way (due to the routes).
hashHistory is not the preferred way to handle routes in production but it can do the trick when you are in dev mode and just want to check the output:
Hash history works without configuring your server, so if you're just getting started, go ahead and use it. In general, though, production web applications should use browserHistory for the cleaner URLs, and for support for server-side rendering, which is impossible with hashHistory.
check https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md#browserhistory for more info.
from webpack-react-redux.
Related Issues (20)
- Warning: [react-router] You cannot change <Router routes> warning on file change HOT 3
- Edit/Save drops a notice about react-router HOT 2
- How to apply middlewares in configureStore.dev.js? HOT 1
- npm run build fails HOT 3
- Server file HOT 1
- JSX files HOT 2
- Local version is working but the built html isn't HOT 2
- webpack will recompile on file change on OS X, but not on Linux HOT 2
- Update to webpack2 HOT 4
- yarn build HOT 2
- redux-devtools HOT 1
- Fresh install, unable to undo location changes in dev tools HOT 1
- Launch to heroku HOT 1
- Trouble integrating with the 'thunk' middleware HOT 4
- Unable to load images from local directory HOT 1
- I just download the demo and follow the instructions with no additional changes but when generate the dist and try to run the index.html I have an error HOT 1
- Open dist/index.html in browser, I got a blank page. HOT 1
- npm install failed for node sass on windows 10 HOT 1
- npm start HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-react-redux.