diff options
author | Valentin Popov <info@valentineus.link> | 2019-08-20 11:38:39 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2019-08-20 11:38:39 +0300 |
commit | 419f48c18d84ba3516124571ad8134bf304e65ab (patch) | |
tree | ae09d4cd491815061d84c61ea6b62bf89b098ff4 /test | |
parent | 809a5efb9db4284b0124c75fbaec34d3dd22e7bc (diff) | |
download | electron-hot-reload-419f48c18d84ba3516124571ad8134bf304e65ab.tar.xz electron-hot-reload-419f48c18d84ba3516124571ad8134bf304e65ab.zip |
Added Renderer reloader
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'test')
-rw-r--r-- | test/application/src/main.js | 9 | ||||
-rw-r--r-- | test/application/webpack.config.js | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/test/application/src/main.js b/test/application/src/main.js index bf2144d..d030f18 100644 --- a/test/application/src/main.js +++ b/test/application/src/main.js @@ -1,11 +1,18 @@ // Modules to control application life and create native browser window import { app, BrowserWindow } from 'electron' -// import { mainReloader, rendererReloader } from '../../../dist' +import path from 'path' + +import { mainReloader, rendererReloader } from '../../../dist' // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let mainWindow +const dir = path.join(app.getAppPath(), 'temp') + +mainReloader(dir) +rendererReloader(dir) + function createWindow () { // Create the browser window. mainWindow = new BrowserWindow({ diff --git a/test/application/webpack.config.js b/test/application/webpack.config.js index c1d23e8..6203400 100644 --- a/test/application/webpack.config.js +++ b/test/application/webpack.config.js @@ -13,6 +13,10 @@ const mainConfig = { path: path.resolve(__dirname, 'dist'), filename: '[name].js' }, + node: { + __dirname: true, + __filename: true + }, plugins: [ new CleanWebpackPlugin() ], |