Try to use CSS Modules in TypeScript the same way I would use them in JavaScript, l see an error: ”TS2307: Cannot find module './styles.css'”.
I think webpack css-loader should be updated.
I should not see such an error

how to get red out of this error
you can add this to the next-env.d.ts file.
declare module '*.scss' {
const content: string;
export default content;
}
you can add this to the
next-env.d.tsfile.declare module '*.scss' { const content: string; export default content; }
declare module '*.scss' {
const classes: { [key: string]: string};
export default classes;
}
Works better since you don't get any errors in the code about undeclared props.
Found it here: https://spin.atomicobject.com/2020/06/22/css-module-typescript/
Most helpful comment
you can add this to the
next-env.d.tsfile.