Why is React Webpack production build showing Blank page?

后端 未结 7 1311
北荒
北荒 2020-12-14 02:04

I\'m building a react app, and at the moment webpack-dev-server works just fine( the hello world text shows up ), But webpack -p shows blank pa

7条回答
  •  天命终不由人
    2020-12-14 02:37

    use

    import { HashRouter } from 'react-router-dom';
    

    instead of

    import { BrowserRouter} from 'react-router-dom';
    

    and don't forget to replace it in your routes code

    
      ...
    
    

提交回复
热议问题