-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: @modern-js/module-tools 开发组件库,热更新太卡 #5292
Comments
Can you try to disable some task? Maybe it exist multiple watcher and occupy too much memory. |
Ideally, we should only enable one watcher and rebuild the all task, we need improve it next major version. |
只保留 esm 可以解决,问题出在最后一个任务,这个任务主要用来构建 typeing?我使用 esm 的任务并修改 dts 配置也可以输出 typeing [
{
format: 'cjs',
target: 'es6',
buildType: 'bundleless',
outDir: './dist/lib',
dts: false,
},
{
format: 'esm',
target: 'es6',
buildType: 'bundleless',
outDir: './dist/es',
dts: false,
},
{
buildType: 'bundleless',
outDir: './dist/types',
dts: { only: true },
},
] |
抱歉,看错了,ems 的 dts 设置 { only: true } 后,只会输出 typeing,没有构建的 js |
只跑输出类型的任务会卡吗,如果会的话那和 tsc 有关 |
确实是,测试了下只跑这个任务就会卡 |
tsc watch 的问题可以再研究一下,对于 module tools 本身或许可以细粒度划分一下 watch 命令,只 watch 某个或者某几个任务 |
+1 |
是否可以开发watch相关的钩子 做一些自定义的操作 |
欢迎直接贡献代码 |
版本信息
问题详情
使用 @modern-js/module-tools 本地开发组件库的时候,每次更改代码保存 rebuild 的时候,都会耗尽 cpu 造成机器卡顿,如 vscode 卡死,可以观察下 vscode 反应跟底部 cpu 占用面板,请问那边项目文件多有遇到么,非常影响效率,请帮忙看下🙏
配置
录屏链接:https://www.zhihu.com/zvideo/1733153234569715712
复现链接
复现步骤
The text was updated successfully, but these errors were encountered: