Create React App中的反应包大小增加

问题描述 投票:-1回答:1

在source-map-explorer中分析应用后[无来源]消耗了61.5%0.chunk.js软件包中的[无源] 3.56 MB 61.5%中的无源是什么?

enter image description here

javascript reactjs webpack bundle create-react-app
1个回答
0
投票
这是因为CRA默认情况下会生成源映射,因此在package.json中修改构建命令,如下所示:“ build”:“ GENERATE_SOURCEMAP = false react-scripts build”
© www.soinside.com 2019 - 2024. All rights reserved.