vscode-css-modules icon indicating copy to clipboard operation
vscode-css-modules copied to clipboard

Support styleName="blah" from babel-plugin-react-css-modules

Open mo opened this issue 7 years ago • 3 comments

The "babel-plugin-react-css-modules" npm package allows you to write CSS module references using styleName="my-css-class" instead of className={styles.MyCssClass}. It would be really neat to have vscode-css-modules understand such styleName="" attributes.

Details: https://github.com/gajus/babel-plugin-react-css-modules

mo avatar Jul 28 '17 20:07 mo

Big 👍 this would be awesome, is there anything we could do to help move this along?

madeleineostoja avatar Jun 02 '18 05:06 madeleineostoja

Sorry, I am not using babel-plugin-react-css-modules...This plugin using regular expression to parse files, and PR is welcome...

clinyong avatar Jun 02 '18 07:06 clinyong

If we support it, we need add jsx attributes parse(or simple understand styleName= pattern) and add new trigger char. Current implemention is trigger . character and match import file. It's simple and highly efficient.

iChenLei avatar Aug 21 '21 03:08 iChenLei