-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: Efficient external file watching #19
base: main
Are you sure you want to change the base?
Conversation
- Remove the feature for typescript-plugin-asset to watch files using its own glob. - Use the include/exclude option in tsconfig.json instead. - Only tsserver can watch files.
"react-dom": "18.2.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.3.0-dev.20231014" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to wait for the merge until the vscode release bundled with typescript 5.3.
### `exclude` | ||
|
||
Glob pattern of assets to exclude. `@mizdra/typescript-plugin-asset` does not complete import statements for assets matching this pattern. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include
/exclude
options are obsoluted. The users should use https://www.typescriptlang.org/tsconfig#include or https://www.typescriptlang.org/tsconfig#exclude instead.
This is breaking changes.
ref: vuejs/language-tools#3649, microsoft/TypeScript#56047
Until now, it was not possible to watch asset file additions with tsserver alone. Therefore, typescript-plugin-asset used
ts.sys.watchDirectory
to watch asset file additions on its own.Normally, watching the file system is expensive. Therefore, it is not a good idea for both tsserver and plugin to watch the file system. Only one of them should do the watching.
In this PR, watching the asset files is also left to the tsserver side and the watching in the plugin is removed.