Closed
Description
What version of Bun is running?
1.2.5+013fdddc6
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
bun init
with React template- Attempt to import a
.module.css
file
What is the expected behavior?
Since the docs advertise CSS Modules support, it's expected to not have to define the TypeScript types for them manually.
What do you see instead?
TypeScript error Cannot find module '*.module.css' or its corresponding type declarations.ts (2307)
Additional information
This can be worked around by adding
declare module '*.module.css' {
const classes: { readonly [key: string]: string }
export default classes
}
to a .d.ts file, but it feels off to have to do so.