Skip to content

svelte-check fails when using TypeScript customConditions for subpath imports #646

@xeho91

Description

@xeho91

Describe the bug

In the project, we use import subpaths in package.json.

In order for TypeScript to work (for tests), we added import condition "development".

Using the following TypeScript config with "customConditions" breaks our CI with svelte-check.

By first glance, I'm not sure if the first errors are misleading. I can't find where our TypeScript config gets overiden:

Caution

Getting Svelte diagnostics...

error TS5098: Option 'customConditions' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.

I am not sure if the issue is related to svelte-preprocess, given the error trace paths. I've noticed there's a new version of this one v6. I can't see any connection in CHANGELOG, which would be a possible reference to this issue.

Is there anything that can be done, without necessity to revert usage of subpath imports?

Reproduction

https://github.com/storybookjs/addon-svelte-csf/tree/experimental-support-svelte-v5

Expected behaviour

I expect it to not fail

System Info

macOS 14
Terminal, used CLI svelte-check

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy