tw-in-js / vscode-twind-intellisense

Intelligent Twind tooling for VS Code
MIT License
60 stars 10 forks source link

Unknown utility "class-name" #10

Open synalice opened 2 years ago

synalice commented 2 years ago

To solve https://github.com/tw-in-js/vscode-twind-intellisense/issues/9, I created this file:

// config/twind.config.ts

/** @jsx h */

/** @type {import('twind').Configuration} */

It solved the issue of autocomplete not working for the Twind, but at the same time introduced the above Unknown utillity error. Deleting this config/twind.config.ts file solves the issue, but breaks autocomplete.

For some reason, this file in my Fresh project...

// components/SidebarIcon.tsx

/** @jsx h */
import { h } from "preact";

export function SidebarIcon(props: {iconName: string}) {
  return (
    <div className="sidebar-icon">
      {props.iconName}
    </div>
  );
}

...gives me this error from TypeScript in VSCode:

Unknown utility "sidebar-icon" ts(-2020)

Screenshot from 2022-07-06 15-14-08