mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-17 14:08: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: [
|
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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue