Comments (6)
The render process can load resources in several ways.
Any references made by the loaded file (index.html) like script tags or external style-sheets can be leached from the webContents
events.
To detect modules loading using require('module')
a global hook needs to be implemented.
Hooking the require
function in the main module does not seem to affect sub-modules loading.
@dorayx Have you made any uncommitted progress?
Despite the problems, I feel this warrants looking into.
from electron-reload.
Can I help with this feature ?
from electron-reload.
@dorayx sorry for the late reply! Do you have any suggestions on where to start?
from electron-reload.
@yan-foto I think these events might help:
did-finish-load
did-get-response-details
will-navigate
We can get the URLs of the loaded files by the event did-finish-load
,
but some other files may be loaded by a request, such as the scripts and the stylesheets
I think we can fetch the URLs of those by the event did-get-response-details
Then we create a Map
object to maintain every loaded resource,
an URL as the key and an array of the relative webContents
objects as the value
So every time a resource is changed, we will get the resource URL via the module chokidar
and then reloadIgnoringCache
the webContents
objects associated with it
from electron-reload.
This sounds promising. I haven't got into the details though! Would you create a pull request please 👍 ?
from electron-reload.
Yes, I've been working on it
from electron-reload.
Related Issues (20)
- Return watcher from elecronReload()
- Doesn't relaunch when main process file is changed HOT 1
- Can't update electron main process.
- SoftResetHandler can not be disabled
- Wrong typing of ARGV in typescript definition
- Electron-reload dynamic import fails
- allow array of globs
- C
- B
- Error occurs with latest electron: Cannot read properties of undefined (reading 'app')
- This package causes openDevTools to not work
- Execute code before reloading HOT 1
- Can't import (the CJS) electron-reload from ESM modules, due to use of deprecated CJS feature: module.parent HOT 2
- Cannot read property 'filename' of undefined HOT 6
- Error loading the moduel HOT 1
- Chokidar error on windows HOT 1
- Uncaught TypeError: Cannot read property 'app' of undefined` in `electron-reload/main.js HOT 1
- App reloads on save but changes are not applied HOT 1
- Use dinamic `main` instead of index.js HOT 1
- forceHardReset:false not working... I am changing settings.json file in app directory by fs module, but It lead to DOM reset that I dont want, I am also using dialog.showOpenDialogSync(), idk that cause this problem...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-reload.