fork-ts-checker-webpack-plugin: Type changes to symlinked module files in a monorepo are not updated after the initial launch
Current behavior
Within a monorepo workspace with symlinked packages, changes to files in the symlinked modules are detected, however the types are not dynamically updated during a dev server session.
For example, the following code compiles correctly after the initial launch of webpack.
// original code somewhere in symlinked workspace package
export class Foo {
bar() { return "bar" }
}
let foo = new Foo()
console.log(foo.bar())
// original code somewhere in main workspace
import { Foo } from 'monorepo-package'
new Foo().bar() // this works!
However incremental changes like the ones below will break.
// updated code somewhere in symlinked workspace package
export class Foo {
bar() { return "bar" }
baz() { return "baz" }
}
let foo = new Foo()
console.log(foo.bar())
console.log(foo.baz()) // this works! no errors!
// updated code somewhere in main workspace
import { Foo } from 'monorepo-package'
new Foo().bar() // this works!
new Foo().baz() // this fails! 'baz' is not detected as a new member function
Expected behavior
Changes to types should be updated dynamically across package boundaries in a monorepo.
Steps to reproduce the issue
See the above example.
Issue reproduction repository
N/A… code above might be enough for a repro.
Environment
- fork-ts-checker-webpack-plugin: v6.0.alpha (latest master does not detect symlinks changes at all)
- typescript: v4.1.3
- eslint: v4.19.1
- webpack: v4.44.1
- os: Mac OS 10.14.6
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 26
Commits related to this issue
- test: create repro for https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/557 — committed to ferm10n/fork-ts-checker-webpack-plugin by ferm10n a year ago
@aovchinn I created a PR that should fix that. It fixes the issue in the repo you created 😃 Thanks for your help!