fix webpack config

This commit is contained in:
Labhansh Agrawal 2020-05-29 11:14:04 +05:30 committed by Benjamin Staneck
parent cc4d538b71
commit a9f8c39401

View file

@ -28,30 +28,32 @@ const config: webpack.Configuration[] = [
] ]
}, },
plugins: [ plugins: [
new Copy([ new Copy({
{ patterns: [
from: './app/*.html', {
ignore: ['/node_modules/'], from: './app/*.html',
to: '.', globOptions: {ignore: ['**/node_modules/**']},
flatten: true to: '.',
}, flatten: true
{ },
from: './app/*.json', {
ignore: ['/node_modules/'], from: './app/*.json',
to: '.', globOptions: {ignore: ['**/node_modules/**']},
flatten: true to: '.',
}, flatten: true
{ },
from: './app/keymaps/*.json', {
ignore: ['/node_modules/'], from: './app/keymaps/*.json',
to: './keymaps', globOptions: {ignore: ['**/node_modules/**']},
flatten: true to: './keymaps',
}, flatten: true
{ },
from: './app/static', {
to: './static' from: './app/static',
} to: './static'
]) }
]
})
], ],
target: 'electron-main' target: 'electron-main'
}, },
@ -94,12 +96,14 @@ const config: webpack.Configuration[] = [
NODE_ENV: JSON.stringify(nodeEnv) NODE_ENV: JSON.stringify(nodeEnv)
} }
}), }),
new Copy([ new Copy({
{ patterns: [
from: './assets', {
to: './assets' from: './assets',
} to: './assets'
]) }
]
})
], ],
optimization: { optimization: {
minimize: isProd ? true : false, minimize: isProd ? true : false,