简体   繁体   English

如何在 visual studio code 中缩短 React 应用程序的重新编译时间

[英]How to make fast recompile time of react application in visual studio code

For the past 3/4 days, my react app take more than 3 to 5 minute to compile.在过去的 3/4 天里,我的 React 应用程序编译时间超过 3 到 5 分钟。 My device has 4GB Ram 128 GB SSD and a 500GB hard disk.我的设备有 4GB Ram 128GB SSD 和 500GB 硬盘。 My project is medium size and I use VS Code editor.我的项目是中等规模的,我使用 VS Code 编辑器。 All other apps working perfectly.所有其他应用程序运行良好。 Please help how to fix this issue.请帮忙解决这个问题。

The problem could relate to eslint configuration, if so, you could try to add on the .env file DISABLE_ESLINT_PLUGIN=true and see if there's a considerable change in the recompilation time.问题可能与 eslint 配置有关,如果是这样,您可以尝试在.env文件上添加DISABLE_ESLINT_PLUGIN=true并查看重新编译时间是否有相当大的变化。

You could try and switch a package manager, yarn is recommended for fast compilation time if you are not using it already.您可以尝试切换 package 管理器,如果您还没有使用它,建议使用yarn以加快编译时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM