solidjs/templates

Fix VSCode css module import error highlighting.

KrischnaGabriel opened this issue · 1 comments

Describe the bug

VSCode highlights typescript syntax.
Import statements of css modules are shown as errors.

A "globals.d.ts" file should be included in the src folder with the content

declare module "*.module.css";
declare module "*.module.scss";

when initializing an new typescript project with npx degit solidjs/templates/ts my-ap to fix this issue.

Your Example Website or App

N.A.

Steps to Reproduce the Bug or Issue

  1. npx degit solidjs/templates/ts my-ap
  2. Open src/App.tsx in vscode or a fork of vscode.

Expected behavior

N.A.

Screenshots or Videos

Without the "globals.d.ts" file:
vscode_ts_error

Platform

  • OS: Linux Mint 20.3 Cinnamon
  • Browser: N.A.
  • Version: ^1.4.2

Additional context

No response

Hey, I think this is no longer an issue as Vite's type are supposed to kick in and mark this css files as typescript modules :
image

Let me know if you still run into this and I'll re-open the issue :)