-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Hot reload is not working with CSS modules, starting in 3.1.0 #7561
Comments
Can confirm here. |
I can confirm this too. Just created a new project with cra to test this, I can confirm hot reloading works with imported css files, but not with (s)css modules. Edit: Also just downgraded to 3.0.1 and hot reloading works perfectly on that version. |
Not working in 3.1.2 either. Did anyone get a chance to look into this? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
It is still reproducible in the latest version. Is anybody working on this? |
I'm on react-scripts |
Still not fixed in |
I'm having issues with hot reloading SCSS files in version 3.3.0. |
Same here, 3.3.0 still reloading the whole page
…On 7 Dec 2019 Sat at 23:53 Thomas Smith ***@***.***> wrote:
I'm having issues with hot reloading SCSS files in version 3.3.0.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7561?email_source=notifications&email_token=AAJOJIVN2TSZYGVPARYHEM3QXQENVA5CNFSM4IMT7ASKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGPGZQ#issuecomment-562885478>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJOJIXTKCCNSOTYHCAOLNDQXQENVANCNFSM4IMT7ASA>
.
|
Same here but with less instead os scss. Anybody have workaround ? |
Wondering, did this ever work with styled components? |
You can downgrade until the issue is fixed. 3.0.1 doesn't have this problem |
Also having this issue with 3.3.0 |
Same here with 3.3.0, is there any estimation for fix? |
3.3.0 same issue: I can't downgrade due to my Eslint config (> 6.1.0) |
Bump |
🤷♂️ |
The only workaround I found is to downgrade -"react-scripts": "3.3.0"
+"react-scripts": "3.0.1" |
^ the only reason I'm on 3.3.0 is because of the TS upgrades (introduced in 3.3.0-next.62). |
In theory, you can add TS upgrades from 3.3.0 on 3.0.1 using |
Seeing as the issue started in 3.1.0, then it must be part of this diff: v3.0.1...v3.1.0 I've had a quick look through and can't see anything that might be causing it, maybe it's in one of the updated dependencies? |
Just checked it out with
|
I really don't have any understanding at all about how this stuff works under the hood, so forgive me if I'm saying anything irrelevant/stupid, but I noticed that a new project I created a few days ago is hot reloading fine, while my older one doesn't. Just to see if I could fix the old one, I've put them both on the exact same versions of: cleared yarn and npm caches, deleted node_modules in both, deleted lock files in both, and then reinstalled ... but still the newer project is hot reloading perfectly, and the older one not ... what else could possibly be causing the issue?? |
it's something in 3.1.0 update dude |
In my case, hot reloading works fine using react-scripts 3.1.2 or 3.2.0, but stop working if I upgrade to 3.3.0. I'm trying to upgrade to 3.3.0 in order to get support for typescript optional chaining. Using node-sass in this project. |
The same issue with react-scripts 3.3.0, I downgraded to 3.2.0 and it works fine |
@adambowles @jayantbh @Grawl I just checked what dependency exactly cause issue between 3.0.1 and 3.1.0 and this is definitely due to upgrading
Also I've tested downgrading
Also please check this style-loader issue. |
Looks like this has been fixed in #8378? Appears to be working now in v3.4.0 |
@Torvin yep :) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Describe the bug
Hot reload is not working with CSS modules, after upgrading react-scripts to 3.1.0 or 3.1.1
It works fine with react-scripts 3.0.1
Which terms did you search for in User Guide?
CSS modules hot reload
Environment
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 10.16.2 - ~/.nvm/versions/node/v10.16.2/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.10.3 - ~/.nvm/versions/node/v10.16.2/bin/npm
Browsers:
Chrome: 76.0.3809.100
Firefox: 67.0.4
Safari: 12.1.2
npmPackages:
react: ^16.9.0 => 16.9.0
react-dom: ^16.9.0 => 16.9.0
react-scripts: 3.1.1 => 3.1.1
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
Expected behavior
Editing the css module should be hot reloaded.
Actual behavior
The whole app is reloaded when the css file is edited.
Reproducible demo
https://github.com/igorstajic/cra-css-module-issue
The text was updated successfully, but these errors were encountered: