feat(electron): complete electron integration

* chore(package): update webpack to beta.22

Lastest version before breaking changes.

* feat(electron): Complete Electron integration.

New task to build targeting Electron:

    "build:electron": Alias for build:electron.full
    "prebuild:electron.full": "npm run clean:electron",
    "build:electron.full": "npm run build:electron.renderer && npm run build:electron.main",
    "postbuild:electron.full": "npm run electron:start",

    "build:electron.renderer": Webpack aplication with production properties and targeting electron-renderer
    "build:electron.main": Webpack main Electron with production properties and targeting electron

    "electron:start": "electron build"
This commit is contained in:
Michael De Abreu 2016-10-12 08:59:51 -04:00 committed by Tibing
parent fd09e652c8
commit c6a9d67a83
12 changed files with 208 additions and 32 deletions

View file

@ -0,0 +1,26 @@
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.electron.common.js');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, {
plugins: [
// new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true
},
compress: {
screw_ie8: true
},
comments: false
}),
new webpack.DefinePlugin({
'process.env': {
'ENV': JSON.stringify(ENV)
}
})
]
});