ro-savage / react-scripts-cssmodules

Enable CSS Modules for Create-React-App using the official CRA api
https://www.npmjs.com/package/react-scripts-cssmodules
47 stars 5 forks source link

Make it possible to use SCSS modules #13

Closed benknight closed 5 years ago

benknight commented 5 years ago

I'm trying to use a pattern library in my CRA project that publishes React components that use CSS modules written with SCSS syntax with filenames ending with .module.scss.

It would be great if this fork could support that. Is it realistic?

ro-savage commented 5 years ago

This repo exactly replicates CRA v2.0's implementation of CSS Modules. If you wish to change it, you'll need to make an issue in CRA and have it approved. It'll then be ported to this repo.

danoc commented 5 years ago

Hi @ro-savage,

Noticed that the CRA next branch supports SCSS modules:

https://github.com/facebook/create-react-app/blob/4a87838f527a00be6af42099546ff5d3adf63a6a/packages/react-scripts/config/webpack.config.dev.js#L39

I've tested it locally and confirmed that it works. It was added in https://github.com/facebook/create-react-app/pull/4195.

I'd be happy to help with this.

benknight commented 5 years ago

Great thanks @danoc! Sounds like these most recent updates then can just be ported over.

benknight commented 5 years ago

@ro-savage do you think we could re-open this issue considering the above?