clinyong / vscode-css-modules

https://marketplace.visualstudio.com/items?itemName=clinyong.vscode-css-modules
MIT License
143 stars 39 forks source link

require bug #52

Closed www159 closed 3 years ago

www159 commented 3 years ago

as I use it as suggestion, some trouble things descend. like below: image

but when serving: image

however, as I try to use styles.defaut.<cssName>, it does work image and I lose the intellisense in this way what' wrong ::sad

iChenLei commented 3 years ago

It looks like extension didn't treat CommonJS differently from ESModule cc @clinyong

iChenLei commented 3 years ago

But i am really interested in why you use require not import ?

clinyong commented 3 years ago

@www159 Please use import here

import * as styles from './index.module.less'

Feel free to reopen the issue if you have any other problem.