Add icon to window configuration. (#3365)

This commit is contained in:
Krzysztof Jelski 2020-08-07 14:21:23 +02:00 committed by GitHub
parent 6b701bb082
commit 1663eea3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ export function createWindow (environment: string): Promise<unknown> {
const win = new BrowserWindow({
height,
icon: path.join(__dirname, 'icon.png'),
webPreferences: {
contextIsolation: true,
enableRemoteModule: false,

View File

@ -5,6 +5,7 @@
/* eslint-disable camelcase */
const TerserPlugin = require('terser-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const ENV = process.env.NODE_ENV || 'production';
@ -44,6 +45,9 @@ function createWebpack () {
filename: '[name].js',
path: path.join(__dirname, '/build')
},
plugins: [
new CopyWebpackPlugin({ patterns: [{ from: 'assets' }] })
],
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx']
},