Unverified Commit 867c459e authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Add CSS Module TypeScript Types (#9717)

* Add CSS Module TypeScript Types

* Fix types

* Try another way
parent c593171d
......@@ -10,3 +10,8 @@ declare namespace NodeJS {
readonly NODE_ENV: 'development' | 'production' | 'test'
}
}
declare module '*.module.css' {
const classes: { readonly [key: string]: string }
export default classes
}
import helloStyles from './hello.module.css'
export function hello(): string {
console.log(helloStyles.hello)
return 'Hello'
}
......@@ -3,4 +3,5 @@ module.exports = {
// Make sure entries are not getting disposed.
maxInactiveAge: 1000 * 60 * 60,
},
experimental: { css: true },
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment