Skip to content

CSS files need to pass noUncheckedSideEffectImports after TypeScript 7.0 (tsgo) #801

@kkocdko

Description

@kkocdko

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.

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