Why is React Webpack production build showing Blank page?

后端 未结 7 1299
北荒
北荒 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:26

    None of these worked for me my error was because I mixed up folders

    Solution:

    npm run build
    

    my apache config:

    did not work

    DocumentRoot /var/www/sites/example.com/client/public/
    

    worked (build folder not public)

    DocumentRoot /var/www/sites/example.com/client/build/
    

提交回复
热议问题