Я новичок в разработке React, и это, вероятно, мое первое развертывание в React. То, что я прочитал до сих пор, сборка пряжи не должна занимать более 30 секунд. Но мой проект изначально занимал около 30 минут. Я понял, что в моих файлах было много бесполезного импорта, поэтому я удалил его, и теперь это занимает где-то от 2 до 10 минут, что все еще много по сравнению с тем, что я прочитал в Интернете.
У меня есть попытался прочитать все возможные темы в Интернете, но не нашел способа определить причину этой задержки. Существуют ли какие-либо рекомендуемые инструменты, плагины или рекомендации, которые могут помочь мне определить, что занимает больше времени, и затем я могу исправить это соответствующим образом?
Я также пробовал --debug flag
react-scripts build --debug
но, видимо, ничего не значило. Пожалуйста, смотрите ниже детали сборки пряжи
yarn run v1.19.1
$ react-scripts build --debug
Creating an optimized production build...
File sizes after gzip:
376.66 KB build/static/js/21.7da6b2aa.chunk.js
253.59 KB build/static/js/26.49b05045.chunk.js
250.89 KB build/static/js/27.05bb7c7c.chunk.js
243.52 KB build/static/js/36.3892f954.chunk.js
243.45 KB build/static/js/37.31ca49c7.chunk.js
237.63 KB build/static/js/19.0fc5c664.chunk.js
237.58 KB build/static/js/20.8b6c6b5c.chunk.js
236.91 KB build/static/js/29.85660490.chunk.js
236.86 KB build/static/js/28.a99bde57.chunk.js
221.98 KB build/static/js/18.87a2a223.chunk.js
202.82 KB build/static/js/40.8b871843.chunk.js
195.33 KB build/static/js/39.d1beb347.chunk.js
149.49 KB build/static/js/22.0f694b92.chunk.js
126.93 KB build/static/js/42.8afce8c5.chunk.js
96.27 KB build/static/js/25.7280e65f.chunk.js
88.15 KB build/static/js/38.3012055f.chunk.js
82.57 KB build/static/js/30.1fdf84ce.chunk.js
78.65 KB build/static/js/4.04beaa7d.chunk.js
78.2 KB build/static/js/23.8e77f520.chunk.js
76.85 KB build/static/js/24.1fe90e49.chunk.js
76.76 KB build/static/js/41.dea38dd6.chunk.js
75.02 KB build/static/css/69.93b1c297.chunk.css
75.02 KB build/static/css/70.3a078663.chunk.css
75.02 KB build/static/css/63.644208e9.chunk.css
75.02 KB build/static/css/68.93b1c297.chunk.css
69.14 KB build/static/css/15.4098bda3.chunk.css
69.14 KB build/static/css/42.4098bda3.chunk.css
67.33 KB build/static/js/33.ea271288.chunk.js
62.3 KB build/static/js/35.89805057.chunk.js
55.89 KB build/static/js/31.143a0c3c.chunk.js
55.82 KB build/static/css/78.de70e27f.chunk.css
55.63 KB build/static/js/32.bb137274.chunk.js
54.27 KB build/static/js/52.6b201054.chunk.js
51.76 KB build/static/js/34.ef91e814.chunk.js
42.71 KB build/static/js/14.b39795f1.chunk.js
41.11 KB build/static/js/50.f0df04a4.chunk.js
39.65 KB build/static/js/45.77744779.chunk.js
39.62 KB build/static/js/47.5ef1ae51.chunk.js
39.52 KB build/static/js/46.8c0853bc.chunk.js
30.75 KB build/static/js/53.f344ab5c.chunk.js
29.28 KB build/static/js/11.d39a1945.chunk.js
28.26 KB build/static/js/5.0620ee73.chunk.js
25.26 KB build/static/js/49.f4af204e.chunk.js
25.15 KB build/static/js/48.82863acb.chunk.js
24.3 KB build/static/js/43.24226e8d.chunk.js
24.03 KB build/static/js/51.593be6d9.chunk.js
23.95 KB build/static/js/8.487f29d7.chunk.js
22.53 KB build/static/js/3.f3c9f5df.chunk.js
21.86 KB build/static/js/54.fe12e463.chunk.js
20.55 KB build/static/js/59.3dbfb6e7.chunk.js
18.21 KB build/static/js/68.643ade80.chunk.js
18.08 KB build/static/js/69.87cf8c90.chunk.js
17.34 KB build/static/js/83.067c3897.chunk.js
17.31 KB build/static/js/12.d3b18526.chunk.js
16.4 KB build/static/js/58.3ddc8d03.chunk.js
16.36 KB build/static/js/57.06b60080.chunk.js
14.04 KB build/static/js/44.17b09839.chunk.js
13.24 KB build/static/js/60.6707e0ae.chunk.js
12.06 KB build/static/js/main.157cf998.chunk.js
12.05 KB build/static/js/61.56397e9a.chunk.js
11.83 KB build/static/js/65.8f0502fa.chunk.js
11.04 KB build/static/js/64.6cf3aa59.chunk.js
11.03 KB build/static/js/62.962e5ef8.chunk.js
10.52 KB build/static/js/55.fadce19d.chunk.js
9.85 KB build/static/js/78.bc2863c0.chunk.js
9.54 KB build/static/js/56.fd4c148c.chunk.js
8.45 KB build/static/js/9.2d11c020.chunk.js
7.85 KB build/static/js/75.b50e5245.chunk.js
7.61 KB build/static/css/38.e68f84ee.chunk.css
7.53 KB build/static/js/10.713a14c8.chunk.js
6.88 KB build/static/js/0.85097a19.chunk.js
6.79 KB build/static/js/6.a1539376.chunk.js
6.19 KB build/static/css/13.b4ec63ca.chunk.css
5.7 KB build/static/js/76.c88e4b8d.chunk.js
5.46 KB build/static/js/67.ee14c24a.chunk.js
5.16 KB build/static/js/74.7a66edac.chunk.js
5.11 KB build/static/js/73.202a17c3.chunk.js
5.08 KB build/static/js/72.1163887e.chunk.js
4.92 KB build/static/js/77.31a11202.chunk.js
4.72 KB build/static/js/7.508aeb8e.chunk.js
4.64 KB build/static/js/2.c90541d1.chunk.js
4.54 KB build/static/js/70.63e3af36.chunk.js
3.81 KB build/static/js/66.bb456c7f.chunk.js
3.4 KB build/static/js/63.1167f913.chunk.js
3.26 KB build/static/js/79.2220cbc5.chunk.js
3.01 KB build/static/js/1.c8ec534a.chunk.js
2.92 KB build/static/js/86.cd56b90c.chunk.js
2.73 KB build/static/js/80.317430af.chunk.js
2.51 KB build/static/js/runtime-main.f6f37e49.js
2.34 KB build/static/js/71.45ee2e80.chunk.js
2.11 KB build/static/js/87.fa3bf979.chunk.js
1.88 KB build/static/css/54.17b58a5f.chunk.css
1.88 KB build/static/css/14.17b58a5f.chunk.css
1.88 KB build/static/js/81.793e5254.chunk.js
1.57 KB build/static/js/82.ed55e407.chunk.js
1.35 KB build/static/js/84.2e688bc5.chunk.js
1.35 KB build/static/js/85.7be722a9.chunk.js
1.21 KB build/static/css/26.13a94297.chunk.css
1.21 KB build/static/css/21.2bbcd0be.chunk.css
1.21 KB build/static/css/27.13a94297.chunk.css
1.19 KB build/static/js/88.531e12f7.chunk.js
1.19 KB build/static/css/25.c67b99a5.chunk.css
1.19 KB build/static/css/22.c67b99a5.chunk.css
1.19 KB build/static/css/23.c67b99a5.chunk.css
1.19 KB build/static/css/30.c67b99a5.chunk.css
1.19 KB build/static/css/24.c67b99a5.chunk.css
1.19 KB build/static/css/34.c67b99a5.chunk.css
1.19 KB build/static/css/31.c67b99a5.chunk.css
377 B build/static/js/15.fb5dedf3.chunk.js
85 B build/static/js/13.8a722862.chunk.js
72 B build/static/css/19.7fa752a1.chunk.css
72 B build/static/css/29.7fa752a1.chunk.css
72 B build/static/css/20.7fa752a1.chunk.css
72 B build/static/css/36.7fa752a1.chunk.css
72 B build/static/css/37.7fa752a1.chunk.css
72 B build/static/css/28.7fa752a1.chunk.css
72 B build/static/css/39.7fa752a1.chunk.css
72 B build/static/css/40.7fa752a1.chunk.css
70 B build/static/css/50.cf9be088.chunk.css
70 B build/static/css/41.cf9be088.chunk.css
70 B build/static/css/53.cf9be088.chunk.css
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
yarn global add serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
Done in 169.31s.