You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case: client side page rendering with react-router.
Webpack config:
constfs=require('fs')constpath=require('path')constDIRNAME=fs.realpathSync(process.cwd())constPATHS={app: path.join(DIRNAME,'src'),build: path.join(DIRNAME,'dist')}module.exports={// Set publicPath to '/' so the bundle.js is loaded from absolute url.output: {path: path.join(DIRNAME,'dist'),filename: 'bundle.js',publicPath: '/'},// setting historyApiFallback enables refreshing from browserHistory (?)devServer: {historyApiFallback: true}}
This can be used only in development, not in production.