mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #259] Hot reload not working #176
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AnandK1100 on GitHub (Jan 29, 2020).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/259
Description
Hot reloading is not working for new projects (didn't check on existing one)
To Reproduce
I have created a new proton-native app, using command:
npx proton-native-cli init my-app
cd my-app
npm run dev
After starting it's server, I changed background color of Window and added a component (which renders text) to it.
After saving it, changes are not reflected.
Expected behavior
Changes should reflect immediately.
Versions:
@AshishSarin commented on GitHub (Jan 29, 2020):
I am also facing the same issue.
@kusti8 commented on GitHub (Jan 30, 2020):
What is the terminal output? Is webpack returning any errors? Go into
webpack.config.jsand comment out line 79.1865d55e04/template/webpack.config.js (L79)and then post if there are any warnings.@AnandK1100 commented on GitHub (Jan 31, 2020):
No, it doesn't give any warnings/errors. But changes are not reflected until we start the server again.
Here is the output after commenting out line 79 from webpack.config.js:
Hash: de038b5309dd51533f35 Version: webpack 4.41.5 Time: 59ms Built at: 31/01/2020 10:04:43 Asset Size Chunks Chunk Names 786432da1138fa393a5c.hot-update.json 46 bytes [emitted] [immutable] [hmr] index.out.js 42.4 KiB main [emitted] main index.out.js.map 36 KiB main [emitted] [dev] main main.786432da1138fa393a5c.hot-update.js 4.23 KiB main [emitted] [immutable] [hmr] main main.786432da1138fa393a5c.hot-update.js.map 957 bytes main [emitted] [dev] main Entrypoint main = index.out.js main.786432da1138fa393a5c.hot-update.js index.out.js.map main.786432da1138fa393a5c.hot-update.js.map [./app.js] 2.98 KiB {main} [built] + 8 hidden modules@digimbyte commented on GitHub (Feb 1, 2020):
Same issue, new project on Windows 10
node 12.13.1
the error I am getting is the following
@chadsmith commented on GitHub (Feb 4, 2020):
It appears hot reloading only works with class components and not function components.
@pkantsedalov commented on GitHub (Feb 19, 2020):
I've just successfully tested 2 cases for HMR:
@icetbr commented on GitHub (May 8, 2020):
It needs to have the top element as a class, the rest may be functions it seems.
@justin-calleja commented on GitHub (Jul 29, 2020):
Running:
npm run devUsing Node v10.19.0 on mac.
@rockiger commented on GitHub (Jan 17, 2021):
Changing
whitelisttoallowlistinwebpack.config.jsdid the trick for me.@NickAtumJunior commented on GitHub (Apr 12, 2023):
@rockiger it's freally working thanks