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,22 +28,23 @@ const config: webpack.Configuration[] = [
] ]
}, },
plugins: [ plugins: [
new Copy([ new Copy({
patterns: [
{ {
from: './app/*.html', from: './app/*.html',
ignore: ['/node_modules/'], globOptions: {ignore: ['**/node_modules/**']},
to: '.', to: '.',
flatten: true flatten: true
}, },
{ {
from: './app/*.json', from: './app/*.json',
ignore: ['/node_modules/'], globOptions: {ignore: ['**/node_modules/**']},
to: '.', to: '.',
flatten: true flatten: true
}, },
{ {
from: './app/keymaps/*.json', from: './app/keymaps/*.json',
ignore: ['/node_modules/'], globOptions: {ignore: ['**/node_modules/**']},
to: './keymaps', to: './keymaps',
flatten: true flatten: true
}, },
@ -51,7 +52,8 @@ const config: webpack.Configuration[] = [
from: './app/static', from: './app/static',
to: './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', from: './assets',
to: './assets' to: './assets'
} }
]) ]
})
], ],
optimization: { optimization: {
minimize: isProd ? true : false, minimize: isProd ? true : false,