CSS files need to pass `noUncheckedSideEffectImports` after TypeScript 7.0 (tsgo)
Author: kkocdkoCreated Apr 23, 2026Updated Apr 23, 2026
noUncheckedSideEffectImports enabled by default on TypeScript 7.0 (tsgo), so
import "@radix-ui/themes/styles.css";now will cause:
> Cannot find module or type declarations for side-effect import of '@radix-ui/themes/styles.css' (ts 2882)According to the TypeScript official docs, we needs:
// Recognize all CSS files as module imports.
declare module "*.css" {}I try to add above in my project's ./node_modules/@radix-ui/themes/globals.d.ts, it works well, but I do not know how to add to radix-ui/themes's build system.
Source: radix-ui/themes