Skip to content

Commit

Permalink
fixed icon paths
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiez committed Mar 9, 2020
1 parent d61cf8b commit ae4666d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
7 changes: 4 additions & 3 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -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: [
Expand Down
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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,
Expand Down
7 changes: 0 additions & 7 deletions webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions webpack.rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ module.exports = [
},
}
},
{
test: /\.(woff|woff2|eot|ttf|otf|png|jpg|jpeg|webp|svg)$/,
use: [
'file-loader',
],
},
];

0 comments on commit ae4666d

Please sign in to comment.