mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
fix webpack config
This commit is contained in:
parent
cc4d538b71
commit
a9f8c39401
1 changed files with 34 additions and 30 deletions
|
|
@ -28,30 +28,32 @@ const config: webpack.Configuration[] = [
|
|||
]
|
||||
},
|
||||
plugins: [
|
||||
new Copy([
|
||||
{
|
||||
from: './app/*.html',
|
||||
ignore: ['/node_modules/'],
|
||||
to: '.',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/*.json',
|
||||
ignore: ['/node_modules/'],
|
||||
to: '.',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/keymaps/*.json',
|
||||
ignore: ['/node_modules/'],
|
||||
to: './keymaps',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/static',
|
||||
to: './static'
|
||||
}
|
||||
])
|
||||
new Copy({
|
||||
patterns: [
|
||||
{
|
||||
from: './app/*.html',
|
||||
globOptions: {ignore: ['**/node_modules/**']},
|
||||
to: '.',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/*.json',
|
||||
globOptions: {ignore: ['**/node_modules/**']},
|
||||
to: '.',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/keymaps/*.json',
|
||||
globOptions: {ignore: ['**/node_modules/**']},
|
||||
to: './keymaps',
|
||||
flatten: true
|
||||
},
|
||||
{
|
||||
from: './app/static',
|
||||
to: './static'
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
target: 'electron-main'
|
||||
},
|
||||
|
|
@ -94,12 +96,14 @@ const config: webpack.Configuration[] = [
|
|||
NODE_ENV: JSON.stringify(nodeEnv)
|
||||
}
|
||||
}),
|
||||
new Copy([
|
||||
{
|
||||
from: './assets',
|
||||
to: './assets'
|
||||
}
|
||||
])
|
||||
new Copy({
|
||||
patterns: [
|
||||
{
|
||||
from: './assets',
|
||||
to: './assets'
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimize: isProd ? true : false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue