Skip to content

bug(extension): unocss vscode extension hangs when using tsconfig paths imports in config file #4133

@rafael-lua

Description

@rafael-lua

UnoCSS version

0.62.2

Describe the bug

When I import a file using the tsconfig paths, unocss extension seems to hang and stop working until I reload the vscode window. It does not come back even if I change back to a normal import. The code runs fine, types and autocomplete for file imports works, but unocss extension just becomes nonfunctional. It does not print any error on vscode outputs (unocss, extensions, etc...)

I'm using a basic monorepo setup.

Code_5wxo0ZDWBl.mp4

Here is the tsconfig I'm using:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "types": ["vite/client"],
    "noEmit": true,
    "isolatedModules": true,
    "skipLibCheck": true,

    "baseUrl": ".",
    "paths": {
      "~": ["."],
      "~/*": ["./*"],
      "@": ["../.."],
      "@/*": ["../../*"]
    }
  },
  "include": ["**/*", "../../utils"]
}

Reproduction

https://github.com/rafael-lua/repro-unocss-extension-issue

Instructions on the readme.

System Info

Windows 11 (wsl2), Solid Framework, Monorepo with Changesets, typescript 5.3.3

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions