Skip to content

Changes in a monorepo package outside workspace root are not reflected in other apps #1415

@AnatoleLucet

Description

@AnatoleLucet

Describe the bug
In a pnpm monorepo, a change made in a Svelte file in a package will not be reflected in apps until the LSP is restarted.

To Reproduce
Clone: https://github.com/AnatoleLucet/svelte-lsp-monorepo-issue
and install the deps with pnpm.

Both the ui package and the web app are barebone SvelteKit projects.

The ui package exports the Hello.svelte component, which has a prop named word of type string.
The web app is importing the ui package and using the Hello.svelte component in src/routes/index.svelte.
If I change word's type to a number, the LSP will not reflect this change in the web app. I need to restart the LSP to get the expected Type 'string' is not assignable to type 'number'..

Expected behavior
Reflect the changes when another package is changed (as the typescript LSP is doing)

Screenshots

System (please complete the following information):

  • OS: Linux Manjaro 21.2.3
  • IDE: NeoVim 0.6.1 with the lsp-config plugin
  • Plugin/Package: svelte-language-server 0.14.23

Additional context
I'm not sure why, but I do not see the issue in VsCode.
You can check out the NeoVim Svelte lsp-config here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions