Raw `tsc --noEmit` (the configured web typecheck gate) errored TS2882 on side-effect stylesheet imports (import './globals.css', cropperjs css) because next-env.d.ts does not declare *.css. Next's build handles these; add an ambient declaration so the typecheck gate matches build reality. Typecheck now exits 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 lines
445 B
TypeScript
10 lines
445 B
TypeScript
// Ambient declarations for side-effect stylesheet imports.
|
|
//
|
|
// Next.js compiles CSS imports at build time, but a raw `tsc --noEmit` (the
|
|
// configured typecheck gate) has no knowledge of `.css` files and errors on
|
|
// `import './globals.css'` style side-effect imports (TS2882). Declaring the
|
|
// modules here keeps the typecheck gate green without affecting the build.
|
|
declare module '*.css';
|
|
declare module '*.scss';
|
|
declare module '*.sass';
|