Comments (4)
I see this issue, but the method don't work.
externals: {
'electron-reload': 'electron-reload',
},
Result:
A JavaScript error occurred in the main process
Uncaught Exception:
ReferenceError: electron is not defined
at eval (webpack:///external_%22electron-reload%22?:1:18)
...
from electron-reload.
I've created a repository to test this situation.
from electron-reload.
I see the problem that is in the WebPack.
So I've found a solution to the problem. You should add a section to a config file.
node: {
__dirname: false
}
Maybe, add this information to the README file?
WebPack example config
const path = require('path');
module.exports = {
mode: "development",
target: 'electron-main',
entry: {
main: './src/main.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
babelrc: false,
presets: ['@babel/preset-env']
}
}
}]
},
node: {
__dirname: false
}
}
from electron-reload.
Hi @valentineus , thanks for getting involved in this project, but as you already found out, this is not a bug within electron-relaod
. I'll close this issue and will add a note in README in future releases.
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
- Hard reset not working HOT 5
- 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.