-
Notifications
You must be signed in to change notification settings - Fork 801
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
react hot loader for folder outside root #1400
Comments
What is |
I tried to isolate the issue. When I change something on a file that is outside root folder, I see:
Page doesn't update. When I refresh the page, I see the update. |
It might be due to the absence of a babel plugin for them. There is no simple way to fix it, except enforce babel configuration for babel-loader, but this would not work for everyone. |
This is my babel config.
Everything works great except the hot-loader part.
How would I do this? |
Well, you are doing it already. Just add babel options to the loader, not let it use |
I have a babel.config.js file already.
Everything works except hot loader in the service folder which is on same level as app. |
One more thought - it might use "the other" react-hot-loader. |
I got semi-working. On a folder outside root, I have
If I go to individual components and apply hot-loader, it works.
Is there a way to apply it to all module.exports rather than add it to each component individually? I tried adding just babel.config.js, importing just 'react-hot-loader' via alias but none of them seem to work. |
So roughly - To be honest I am not sure why it's not working. The Devil is hidden in details. |
Description
I can't get
react-hot-loader
to work for dependencies outside of root project.Expected behavior
React-hot-loader should work as intended.
Actual behavior
Browser refreshes the complete page
Environment
React Hot Loader version: 8
Run these commands in the project folder and fill in their results:
node -v
: 10.16.3npm -v
: 6.9.0Then, specify:
Details
I have two projects (on same level)
[app]
[service]
Inside app/webpack.conf.js, i have defined alias as:
My entry file (Home.js):
Now hot loader works for
Content
but not forService
.Is there anything I am missing here?
This is what I see on console.
The text was updated successfully, but these errors were encountered: