From ae4666dd2b89c3275531f9864ac79938cbb67770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Matthies?= Date: Mon, 9 Mar 2020 08:01:32 +0100 Subject: [PATCH] fixed icon paths --- forge.config.js | 7 ++++--- src/index.ts | 6 ++---- webpack.renderer.config.js | 7 ------- webpack.rules.js | 6 ++++++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/forge.config.js b/forge.config.js index 4b3da2a..728b132 100644 --- a/forge.config.js +++ b/forge.config.js @@ -1,10 +1,11 @@ const path = require('path'); const fs = require('fs'); -const pkg = require('./package.json'); +const assert = require('assert'); -const icon = path.join(__dirname, './src/assets/img/logos/128x128.png'); +const pkg = require('./package.json'); -console.assert(fs.existsSync(icon)); +const icon = path.join(__dirname, './src/assets/img/128x128.png'); +assert.ok(fs.existsSync(icon)); module.exports = { makers: [ diff --git a/src/index.ts b/src/index.ts index 78d436b..84d6bad 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,12 @@ import {app, BrowserWindow} from 'electron'; import installExtension, {REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS} from 'electron-devtools-installer'; -import * as path from 'path'; + +declare const MAIN_WINDOW_WEBPACK_ENTRY: any; app.allowRendererProcessReuse = true; const isDev = process.env.NODE_ENV!.startsWith('dev'); -declare const MAIN_WINDOW_WEBPACK_ENTRY: any; - // Handle creating/removing shortcuts on Windows when installing/uninstalling. if (require('electron-squirrel-startup')) { // eslint-disable-line global-require app.quit(); @@ -17,7 +16,6 @@ const createWindow = async () => { const mainWindow = new BrowserWindow({ height: isDev ? 1080 : 600, width: isDev ? 1920 : 800, - icon: path.join(__dirname, 'assets/img/logos/128x128.png'), webPreferences: { nodeIntegration: true, webviewTag: true, diff --git a/webpack.renderer.config.js b/webpack.renderer.config.js index 95b3597..4b25534 100644 --- a/webpack.renderer.config.js +++ b/webpack.renderer.config.js @@ -6,13 +6,6 @@ rules.push({ use: [{loader: 'style-loader'}, {loader: 'css-loader'}, {loader: 'sass-loader'}], }); -rules.push({ - test: /\.(woff|woff2|eot|ttf|otf|png|jpg|jpeg|webp|svg)$/, - use: [ - 'file-loader', - ], -}); - module.exports = { module: { rules, diff --git a/webpack.rules.js b/webpack.rules.js index d213385..806b49a 100644 --- a/webpack.rules.js +++ b/webpack.rules.js @@ -25,4 +25,10 @@ module.exports = [ }, } }, + { + test: /\.(woff|woff2|eot|ttf|otf|png|jpg|jpeg|webp|svg)$/, + use: [ + 'file-loader', + ], + }, ];