最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - Ng serve with linked npm package with watch enabled compiling too slow after edits in package - Stack Overflow

programmeradmin3浏览0评论

Preconditions:

Angular 14 npm package that is linked locally with npm link and is building with tsc && (concurrently "tsc -w" "tsc-alias -w")

I need to import package from dist folder, not from src

Problem:

When I serve my app using ng serve and make changes in library, library itself is built fast but app takes a lot of time to recompile (3 times longer then usually).

What i tried:

  • I tried configuring webpack to exclude all node_modules except my package. Then i noticed that after changing any file in node_modules, app also takes a lot of time recompiling.
  • I tried flag incremental
  • List item
  • I tried HMR
  • I tried disabling and enabling compiler option preserveSymLinks for tsconfig
  • I tried to set path to package locally without symlink in tsconfig.
  • I tried creating angular lib for this package.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论