Gatsby supports css modules out of the box. However, VsCode does not. This results in:
page.module.css
For example, there is no completion in the following code and the import is underlined in red
import styles from './componentName.module.css'
How do I get my IDE to support css modules?
This is different from getting my code to compile. It already compiles because Gatsby supports css modules, I just need my IDE to recognize them.
Have you tried const styles = require('./componentName.module.css');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.