Merge pull request #490 from h3poteto/fix/build

Fix buil setting for locales
This commit is contained in:
AkiraFukushima 2018-08-15 00:52:16 +09:00 committed by GitHub
commit 192b491e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,7 @@ const path = require('path')
const { dependencies } = require('../package.json') const { dependencies } = require('../package.json')
const webpack = require('webpack') const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MinifyPlugin = require('babel-minify-webpack-plugin') const MinifyPlugin = require('babel-minify-webpack-plugin')
let mainConfig = { let mainConfig = {
@ -49,7 +50,14 @@ let mainConfig = {
path: path.join(__dirname, '../dist/electron') path: path.join(__dirname, '../dist/electron')
}, },
plugins: [ plugins: [
new webpack.NoEmitOnErrorsPlugin() new webpack.NoEmitOnErrorsPlugin(),
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../src/config/locales'),
to: path.join(__dirname, '../dist/electron/locales'),
ignore: ['.*', '*~']
}
])
], ],
resolve: { resolve: {
extensions: ['.js', '.json', '.node'] extensions: ['.js', '.json', '.node']