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: [
new Copy([
new Copy({
patterns: [
{
from: './app/*.html',
ignore: ['/node_modules/'],
globOptions: {ignore: ['**/node_modules/**']},
to: '.',
flatten: true
},
{
from: './app/*.json',
ignore: ['/node_modules/'],
globOptions: {ignore: ['**/node_modules/**']},
to: '.',
flatten: true
},
{
from: './app/keymaps/*.json',
ignore: ['/node_modules/'],
globOptions: {ignore: ['**/node_modules/**']},
to: './keymaps',
flatten: true
},
@ -51,7 +52,8 @@ const config: webpack.Configuration[] = [
from: './app/static',
to: './static'
}
])
]
})
],
target: 'electron-main'
},
@ -94,12 +96,14 @@ const config: webpack.Configuration[] = [
NODE_ENV: JSON.stringify(nodeEnv)
}
}),
new Copy([
new Copy({
patterns: [
{
from: './assets',
to: './assets'
}
])
]
})
],
optimization: {
minimize: isProd ? true : false,