clinyong / vscode-css-modules

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

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

Open mo opened 7 years ago

mo commented 7 years ago

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

madeleineostoja commented 6 years ago

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

clinyong commented 6 years ago

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

iChenLei commented 3 years ago

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.