microsoft / microsoft/TypeScript
Documented server plugin example fails with relative path
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 4.0.3 & 4.1.0-dev.20201003
Search Terms: plugin link path
Code
Writing a Language Service Plugin | Putting it all together
https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin#putting-it-all-together
Summary:
I have recreated the example plugin found in the documentation at Writing a Language Service Plugin.
The example works when using 'npm link', but not with relative paths.

I referred to the plugin in tsconfig like this:
"plugins": [{
"name": "../plugin"
}]
I have also tried to refer to ../plugin/index and ../plugin/index.js, but neither of them works.
Expected behavior:
Be able to refer to the plugin with a relative path.
Actual behavior:
Silently fails without the plugin being loaded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Writing a Language Service Plugin example and reproduce its tsconfig plugin configuration using the relative ../plugin path. Trace how that configuration resolves the plugin, then verify that the documented example loads the plugin without npm link and no longer fails silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100