Skip to content

fix: add missing CSS module declarations to Vite-based examples#260

Merged
panz3r merged 2 commits intomainfrom
copilot/add-css-import-declarations
Apr 4, 2026
Merged

fix: add missing CSS module declarations to Vite-based examples#260
panz3r merged 2 commits intomainfrom
copilot/add-css-import-declarations

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

Affected Package(s)

  • Examples

Related Issue(s)

Motivation

TypeScript requires a declare module '*.css' ambient declaration to resolve bare CSS imports without type errors. Only showcase had this correctly set up; base, reqres, and refresh-token were missing it entirely or partially.

Description of Changes

  • Created examples/base/src/vite-env.d.ts with /// <reference types="vite/client" /> and declare module '*.css'
  • Created examples/reqres/src/vite-env.d.ts with the same content
  • Added declare module '*.css' to the existing examples/refresh-token/src/vite-env.d.ts (which had only the vite/client reference)

All four Vite-based examples now have a consistent vite-env.d.ts:

/// <reference types="vite/client" />
declare module '*.css';

Breaking Changes

None

How to Test

  1. CI Checks: Verify that all automated tests (Vitest) and build steps pass successfully on this PR.
  2. Local Verification (Optional):
    • Run pnpm install to install dependencies.
    • Run pnpm --filter <affected-package> test to run tests for the affected package.
    • Run pnpm --filter <affected-package> build to verify the build succeeds.
    • Run pnpm --filter <affected-package> lint to check for linting errors.

Checklist

  • My code follows the project's style guidelines
  • I have added or updated tests to cover the changes
  • I have updated relevant documentation
  • All tests are passing locally
  • CI checks are passing
  • I have reviewed my own code and lock file changes
  • I have checked for any potential security implications
  • I have verified the changes work as expected
  • My commit messages follow Conventional Commits format

Notes for Reviewers

expo is React Native (no Vite), so it does not need a vite-env.d.ts. No logic changes — declaration files only.

Copilot AI changed the title [WIP] Fix TypeScript CSS import declarations in examples fix: add missing CSS module declarations to Vite-based examples Apr 4, 2026
Copilot AI requested a review from panz3r April 4, 2026 15:43
@panz3r panz3r requested a review from Copilot April 4, 2026 15:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@panz3r panz3r marked this pull request as ready for review April 4, 2026 17:05
@panz3r panz3r merged commit 88af43e into main Apr 4, 2026
16 checks passed
@panz3r panz3r deleted the copilot/add-css-import-declarations branch April 4, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: TypeScript CSS import declarations missing from most examples

3 participants