Why is React Webpack production build showing Blank page?

后端 未结 7 1306
北荒
北荒 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条回答
  •  萌比男神i
    2020-12-14 02:19

    Changing

    import {BrowserRouter as Router} from 'react-router-dom'

    to:

    import {HashRouter as Router} from 'react-router-dom'

    in App.js helped me fix the same issue in my create-react-app project.

提交回复
热议问题