mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 07:50:12 +01:00
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:
parent
fd09e652c8
commit
c6a9d67a83
12 changed files with 208 additions and 32 deletions
26
config/electron/webpack.electron.prod.js
Normal file
26
config/electron/webpack.electron.prod.js
Normal 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)
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue