Update webpack to 4.27.0 and babel to 7.2.0

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2018-12-05 17:18:40 +01:00
parent b8fc83577c
commit a78866069b
3 changed files with 1046 additions and 603 deletions

1624
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -93,12 +93,12 @@
"winusb-driver-generator": "1.2.4"
},
"devDependencies": {
"@babel/core": "7.2.0",
"@babel/plugin-proposal-function-bind": "7.2.0",
"@babel/preset-env": "7.2.0",
"@babel/preset-react": "7.0.0",
"angular-mocks": "1.6.3",
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"babel-loader": "8.0.4",
"electron": "1.7.13",
"electron-builder": "19.40.0",
"electron-mocha": "6.0.1",
@ -123,7 +123,8 @@
"simple-progress-webpack-plugin": "1.1.2",
"spectron": "3.7.3",
"versionist": "4.0.1",
"webpack": "github:jviotti/webpack#symlink-fix",
"webpack": "4.27.0",
"webpack-cli": "3.1.2",
"webpack-node-externals": "1.7.2"
}
}

View File

@ -17,12 +17,16 @@
'use strict'
const _ = require('lodash')
const webpack = require('webpack')
const path = require('path')
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin')
const nodeExternals = require('webpack-node-externals')
const commonConfig = {
mode: 'production',
optimization: {
// Minification breaks angular.
minimize: false
},
target: 'electron-main',
module: {
rules: [
@ -32,7 +36,8 @@ const commonConfig = {
use: {
loader: 'babel-loader',
options: {
presets: [ 'react', 'env', 'stage-0' ],
presets: [ '@babel/preset-react', '@babel/preset-env' ],
plugins: [ '@babel/plugin-proposal-function-bind' ],
cacheDirectory: true
}
}
@ -52,9 +57,6 @@ const commonConfig = {
plugins: [
new SimpleProgressWebpackPlugin({
format: process.env.WEBPACK_PROGRESS || 'verbose'
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production')
})
]
}