Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why both extension='scss' and extension='module.scss' not worked? #7636

Open
feonit opened this issue Apr 11, 2019 · 7 comments
Open

Why both extension='scss' and extension='module.scss' not worked? #7636

feonit opened this issue Apr 11, 2019 · 7 comments
Labels

Comments

@feonit
Copy link

feonit commented Apr 11, 2019

I did try this options and that not worked but nowhere is it written why.

module.file_ext=.scss
module.file_ext=.scss.module
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/SCSSModule.js.flow'
module.name_mapper.extension='module.scss' -> '<PROJECT_ROOT>/SCSSModule.js.flow'

I spent a lot of time to understand that what's unnecessary above

I guessed to the working version:

module.file_ext=.scss.module
module.name_mapper.extension='module.scss' -> '<PROJECT_ROOT>/SCSSModule.js.flow'
@villesau
Copy link
Contributor

villesau commented Apr 14, 2019

try this:

module.name_mapper.extension='scss'->'<PROJECT_ROOT>/flowstubs/FlowStub.js.flow'

In our case FlowStub.js.flow is actually an empty file. Also, we do not have any module.file_ext defined. I hope this helps!

@feonit
Copy link
Author

feonit commented Apr 15, 2019

Hello, it is not helps)
In addition, in my .flowconfig i have enabled:

[options]
all=true

@PinkaminaDianePie
Copy link

if your project use webpack, i suggest to use this loader: https://github.com/skovhus/css-modules-flow-types
it will create flow types from css modules, so you will even get an errors if you import unexisted class! it will help you to write more safe code :)

@feonit
Copy link
Author

feonit commented Apr 18, 2019

CRA2 :) without eject

@PinkaminaDianePie
Copy link

i use this: https://github.com/timarney/react-app-rewired without eject :)

@pkyeck
Copy link

pkyeck commented Apr 23, 2020

@PinkaminaDianePie could you share you config-overrides?

@PinkaminaDianePie
Copy link

@pkyeck in this line:
https://github.com/SphericalWorld/spherical-world/blob/5071cc7cd980e80af0d7296f241b462eda3d2f6a/config-overrides.js#L46
I have no idea if it would help, I didn't work on that project for a year, so no idea if some major change didn't break it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants