Merge pull request #19 from andrerfneves/hotfix/electron-build
hotfix: use terser-webpack-plugin instead of uglifyjs
This commit is contained in:
commit
85a4b8699a
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
import electron from 'electron';
|
import electron from 'electron';
|
||||||
import { Application } from 'spectron';
|
import { Application } from 'spectron';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import generateRandomString from '../utils/generate-random-string';
|
import generateRandomString from '../utils/generate-random-string';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const HtmlWebPackPlugin = require('html-webpack-plugin'); // eslint-disable-line
|
const HtmlWebPackPlugin = require('html-webpack-plugin'); // eslint-disable-line
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); // eslint-disable-line
|
const TerserPlugin = require('terser-webpack-plugin'); // eslint-disable-line
|
||||||
const autoprefixer = require('autoprefixer');
|
const autoprefixer = require('autoprefixer');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
index: ['@babel/polyfill', './app/index.js'],
|
index: ['@babel/polyfill', './app/index.js'],
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: [new UglifyJSPlugin({ sourceMap: true })],
|
minimizer: [new TerserPlugin({ sourceMap: true })],
|
||||||
},
|
},
|
||||||
devtool: 'cheap-module-source-map',
|
devtool: 'cheap-module-source-map',
|
||||||
target: 'electron-renderer',
|
target: 'electron-renderer',
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
"docz": "0.13.4",
|
"docz": "0.13.4",
|
||||||
"docz-plugin-css": "^0.11.0",
|
"docz-plugin-css": "^0.11.0",
|
||||||
"docz-theme-default": "0.13.4",
|
"docz-theme-default": "0.13.4",
|
||||||
|
"electron": "^3.0.13",
|
||||||
"electron-builder": "^20.36.2",
|
"electron-builder": "^20.36.2",
|
||||||
"electron-icon-maker": "^0.0.4",
|
"electron-icon-maker": "^0.0.4",
|
||||||
"electron-is-dev": "^1.0.1",
|
"electron-is-dev": "^1.0.1",
|
||||||
|
@ -77,7 +78,7 @@
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"spectron": "^5.0.0",
|
"spectron": "^5.0.0",
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^0.23.1",
|
||||||
"uglifyjs-webpack-plugin": "^2.0.1",
|
"terser-webpack-plugin": "^1.1.0",
|
||||||
"wait-on": "^3.2.0",
|
"wait-on": "^3.2.0",
|
||||||
"webpack": "^4.4.1",
|
"webpack": "^4.4.1",
|
||||||
"webpack-bundle-analyzer": "^3.0.3",
|
"webpack-bundle-analyzer": "^3.0.3",
|
||||||
|
@ -91,7 +92,6 @@
|
||||||
"connected-react-router": "^5.0.1",
|
"connected-react-router": "^5.0.1",
|
||||||
"date-fns": "^1.30.1",
|
"date-fns": "^1.30.1",
|
||||||
"dotenv": "^6.2.0",
|
"dotenv": "^6.2.0",
|
||||||
"electron": "^3.0.10",
|
|
||||||
"electron-store": "^2.0.0",
|
"electron-store": "^2.0.0",
|
||||||
"eres": "^1.0.1",
|
"eres": "^1.0.1",
|
||||||
"got": "^9.3.2",
|
"got": "^9.3.2",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
import { net } from 'electron';
|
import { net } from 'electron';
|
||||||
|
|
||||||
type Payload = {
|
type Payload = {
|
||||||
|
|
32
yarn.lock
32
yarn.lock
|
@ -1537,9 +1537,9 @@
|
||||||
integrity sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==
|
integrity sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==
|
||||||
|
|
||||||
"@types/node@^8.0.24":
|
"@types/node@^8.0.24":
|
||||||
version "8.10.38"
|
version "8.10.39"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.38.tgz#e05c201a668492e534b48102aca0294898f449f6"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.39.tgz#e7e87ad00364dd7bc485c940926345b8ec1a26ca"
|
||||||
integrity sha512-EibsnbJerd0hBFaDjJStFrVbVBAtOy4dgL8zZFw0uOvPqzBAX59Ci8cgjg3+RgJIWhsB5A4c+pi+D4P9tQQh/A==
|
integrity sha512-rE7fktr02J8ybFf6eysife+WF+L4sAHWzw09DgdCebEu+qDwMvv4zl6Bc+825ttGZP73kCKxa3dhJOoGJ8+5mA==
|
||||||
|
|
||||||
"@types/q@^1.5.1":
|
"@types/q@^1.5.1":
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
|
@ -3073,7 +3073,7 @@ cacache@^10.0.4:
|
||||||
unique-filename "^1.1.0"
|
unique-filename "^1.1.0"
|
||||||
y18n "^4.0.0"
|
y18n "^4.0.0"
|
||||||
|
|
||||||
cacache@^11.0.2, cacache@^11.2.0:
|
cacache@^11.0.2:
|
||||||
version "11.3.1"
|
version "11.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f"
|
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f"
|
||||||
integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==
|
integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==
|
||||||
|
@ -5358,10 +5358,10 @@ electron-updater@^4.0.4:
|
||||||
semver "^5.6.0"
|
semver "^5.6.0"
|
||||||
source-map-support "^0.5.9"
|
source-map-support "^0.5.9"
|
||||||
|
|
||||||
electron@^3.0.10:
|
electron@^3.0.13:
|
||||||
version "3.0.10"
|
version "3.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.10.tgz#7d412856e8cf0d3041a612a32dd09e2af2d50f50"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.13.tgz#7b065a3d130c6b6379dc78d49515e03f392c1303"
|
||||||
integrity sha512-I39IeQP3NOlbjKzTDK8uK2JdiHDfhV5SruCS2Gttkn2MaKCY+yIzQ6Wr4DyBXLeTEkL1sbZxbqQVhCavAliv5w==
|
integrity sha512-tfx5jFgXhCmpe6oPjcesaRj7geHqQxrJdbpseanRzL9BbyYUtsj0HoxwPAUvCx4+52P6XryBwWTvne/1eBVf9Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "^8.0.24"
|
"@types/node" "^8.0.24"
|
||||||
electron-download "^4.1.0"
|
electron-download "^4.1.0"
|
||||||
|
@ -14523,7 +14523,7 @@ uglify-es@^3.3.4:
|
||||||
commander "~2.13.0"
|
commander "~2.13.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
|
|
||||||
uglify-js@3.4.x, uglify-js@^3.0.0, uglify-js@^3.1.4:
|
uglify-js@3.4.x, uglify-js@^3.1.4:
|
||||||
version "3.4.9"
|
version "3.4.9"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
|
||||||
integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==
|
integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==
|
||||||
|
@ -14545,20 +14545,6 @@ uglifyjs-webpack-plugin@^1.3.0:
|
||||||
webpack-sources "^1.1.0"
|
webpack-sources "^1.1.0"
|
||||||
worker-farm "^1.5.2"
|
worker-farm "^1.5.2"
|
||||||
|
|
||||||
uglifyjs-webpack-plugin@^2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.0.1.tgz#f346af53ed496ce72fef462517d417f62bec3010"
|
|
||||||
integrity sha512-1HhCHkOB6wRCcv7htcz1QRPVbWPEY074RP9vzt/X0LF4xXm9l4YGd0qja7z88abDixQlnVwBjXsTBs+Xsn/eeQ==
|
|
||||||
dependencies:
|
|
||||||
cacache "^11.2.0"
|
|
||||||
find-cache-dir "^2.0.0"
|
|
||||||
schema-utils "^1.0.0"
|
|
||||||
serialize-javascript "^1.4.0"
|
|
||||||
source-map "^0.6.1"
|
|
||||||
uglify-js "^3.0.0"
|
|
||||||
webpack-sources "^1.1.0"
|
|
||||||
worker-farm "^1.5.2"
|
|
||||||
|
|
||||||
ulid@^2.3.0:
|
ulid@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/ulid/-/ulid-2.3.0.tgz#93063522771a9774121a84d126ecd3eb9804071f"
|
resolved "https://registry.yarnpkg.com/ulid/-/ulid-2.3.0.tgz#93063522771a9774121a84d126ecd3eb9804071f"
|
||||||
|
|
Loading…
Reference in New Issue