加快与打字稿项目建立在开发模式下的反应
我有一个使用创建React App构建的TypeScript的React项目。 启动命令react-scripts start
在任何文件更改时首次大约需要50秒钟,大约需要3秒钟。
每次更改代码后,如何特别加快构建时间?
我已经尝试过的一些事情
- 使用了craco,并在开发模式下介绍了eSbuild,而不是babel
- disabled eslint 但是这些并没有给我带来太大的速度。
我应该在哪个方向上进行调试?
I have a React project using Typescript built using create react app.
The start command react-scripts start
takes around 50s on first time and around 3 seconds on any file change.
How can I speed up the build time specially after each change in code?
Some things I already tried
- Used craco and introduced esbuild instead of babel
- Disabled eslint in dev mode
But these did not gave me much improvement in speed.
In which direction I should be debugging this more?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现,如果我们弹出CRA并使用 vite 而不是webpack而不是webpack在构建时间上产生了很大的不同。您可以尝试。
I found that if we eject the CRA and use Vite instead of Webpack makes a lot of difference in the build time. You can try that.