How to import CSS modules in Typescript with Webpack?
Generate (or auto-generate)
.d.tsfiles for CSS? And use classic Typescriptimportstatement? With./styles.css.d.ts:import * as styles from './styles.css'Import using
requireWebpack function?let styles = require("./styles.css");
But for the last approach I must define the require function.
What is the best approach or best option and one that can also handle IntelliSense for the CSS file definitions and classes?

let styles = require("./styles.css");is the best approch because it is es5 version of javascript which is compatible with every feature of react.import * as styles from './styles.css'is es6 version of javascript.