Merge pull request #1481 from h3poteto/fix/copy-plugin
Fix options for copy-webpack-plugin
This commit is contained in:
commit
9d964fd5e8
@ -60,13 +60,18 @@ let mainConfig = {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
new webpack.NoEmitOnErrorsPlugin(),
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin({
|
||||||
{
|
patterns: [
|
||||||
from: path.join(__dirname, '../src/config/locales'),
|
{
|
||||||
to: path.join(__dirname, '../dist/electron/locales'),
|
from: path.join(__dirname, '../src/config/locales'),
|
||||||
ignore: ['.*', '*~']
|
to: path.join(__dirname, '../dist/electron/locales'),
|
||||||
}
|
globOptions: {
|
||||||
])
|
gitignore: true,
|
||||||
|
ignore: ['.*', '*~']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
@ -180,13 +180,18 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
rendererConfig.devtool = ''
|
rendererConfig.devtool = ''
|
||||||
rendererConfig.mode = 'production'
|
rendererConfig.mode = 'production'
|
||||||
rendererConfig.plugins.push(
|
rendererConfig.plugins.push(
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin({
|
||||||
{
|
patterns: [
|
||||||
from: path.join(__dirname, '../static'),
|
{
|
||||||
to: path.join(__dirname, '../dist/electron/static'),
|
from: path.join(__dirname, '../static'),
|
||||||
ignore: ['.*', '*~']
|
to: path.join(__dirname, '../dist/electron/static'),
|
||||||
}
|
globOptions: {
|
||||||
]),
|
gitignore: true,
|
||||||
|
ignore: ['.*', '*~']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': '"production"'
|
'process.env.NODE_ENV': '"production"'
|
||||||
}),
|
}),
|
||||||
|
@ -130,13 +130,18 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
webConfig.devtool = ''
|
webConfig.devtool = ''
|
||||||
webConfig.mode = 'production'
|
webConfig.mode = 'production'
|
||||||
webConfig.plugins.push(
|
webConfig.plugins.push(
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin({
|
||||||
{
|
patterns: [
|
||||||
from: path.join(__dirname, '../static'),
|
{
|
||||||
to: path.join(__dirname, '../dist/web/static'),
|
from: path.join(__dirname, '../static'),
|
||||||
ignore: ['.*']
|
to: path.join(__dirname, '../dist/web/static'),
|
||||||
}
|
globOptions: {
|
||||||
]),
|
gitignore: true,
|
||||||
|
ignore: ['.*', '*~']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': '"production"'
|
'process.env.NODE_ENV': '"production"'
|
||||||
}),
|
}),
|
||||||
|
3
package-lock.json
generated
3
package-lock.json
generated
@ -15601,7 +15601,8 @@
|
|||||||
},
|
},
|
||||||
"gonzales-pe": {
|
"gonzales-pe": {
|
||||||
"version": "4.2.3",
|
"version": "4.2.3",
|
||||||
"resolved": "",
|
"resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-Kjhohco0esHQnOiqqdJeNz/5fyPkOMD/d6XVjwTAoPGUFh0mCollPUTUTa2OZy4dYNAqlPIQdTiNzJTWdd9Htw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "1.1.x"
|
"minimist": "1.1.x"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user