shoelace-style/shoelace

Types cannot be imported with "moduleResolution" set to "bundler"

Open

#2,435 opened on Apr 30, 2025

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (922 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (13,867 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Describe the bug

When using module: "esnext and moduleResolution: "bundler" in TypeScript, the types cannot be imported.

To Reproduce

Steps to reproduce the behavior:

  1. Set module to "esnext" and moduleResolution to "bundler" in tsconfig.json
  2. Add "types": ["@shoelace-style/shoelace/dist/types/vue"]
  3. See an error appear:
Cannot find type definition file for '@shoelace-style/shoelace/dist/types/vue'.

Additional information

The docs tell to use "types": ["@shoelace-style/shoelace/dist/types/vue"] for Vue + TypeScript, but it doesn't work in this specific scenario. Not really sure why.

I'm using shoelace 2.20.1 and typescript 5.8.3

Contributor guide