【发布时间】:2019-08-29 07:46:03
【问题描述】:
尝试在 netlify 上部署 create-react-app,但是我的构建是空白页。我正在使用 .env 文件来加载 firebase api 密钥是构建的问题吗?
即使我尝试在我的计算机上本地打开它,它的空白页面也会在控制台中输出错误:“加载失败的源文件”文件:///event-app/static/js/main.108757a0。 js”"
包.json: https://gist.github.com/Verthon/f82371ad2bb636b2e95c5b7697aa0bb5
➜ event-app git:(master) ✗ npm run build
> event-app@0.1.0 build /home/jurr/Projects/event-app
> node scripts/build.js
Creating an optimized production build...
Compiled with warnings.
./src/components/Router.js
Line 12: 'withFirebase' is defined but never used no-unused-vars
./src/components/Firebase.js
Line 21: 'Firebase' is defined but never used no-unused-vars
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
282.86 KB build/static/js/main.108757a0.js
3.1 KB build/static/css/main.8e671453.css
【问题讨论】:
标签: reactjs create-react-app netlify