From 2da6d6cd6bcc9122cba12184d8a18a0e35f95881 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 15 Feb 2018 14:40:22 +0100 Subject: [PATCH] Add HardSourceWebpackPlugin for faster dev build --- package.json | 15 +++++----- webpack/renderer.config.js | 4 ++- yarn.lock | 60 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d38e4abe..3b13f730 100644 --- a/package.json +++ b/package.json @@ -40,17 +40,17 @@ "webpack-sources": "1.0.1" }, "dependencies": { + "@fortawesome/fontawesome": "^1.1.3", "@fortawesome/fontawesome-free-brands": "^5.0.6", "@fortawesome/fontawesome-free-regular": "^5.0.6", "@fortawesome/fontawesome-free-solid": "^5.0.6", - "@fortawesome/fontawesome": "^1.1.3", "@fortawesome/react-fontawesome": "^0.0.17", "@ledgerhq/common": "2.3.0", "@ledgerhq/currencies": "^2.3.0", "@ledgerhq/hw-app-btc": "^4.0.0", "@ledgerhq/hw-app-eth": "^4.0.0", - "@ledgerhq/hw-transport-node-hid": "^4.0.0", "@ledgerhq/hw-transport": "^4.0.0", + "@ledgerhq/hw-transport-node-hid": "^4.0.0", "axios": "^0.17.1", "babel-runtime": "^6.26.0", "bcryptjs": "^2.4.3", @@ -64,30 +64,30 @@ "electron-updater": "^2.20.1", "fuse.js": "^3.2.0", "history": "^4.7.2", - "i18next-node-fs-backend": "^1.0.0", "i18next": "^10.2.2", + "i18next-node-fs-backend": "^1.0.0", "lodash": "^4.17.5", "moment": "^2.20.1", "object-path": "^0.11.4", "qrcode": "^1.2.0", "query-string": "^5.1.0", - "raven-js": "^3.22.3", "raven": "^2.4.1", + "raven-js": "^3.22.3", + "react": "^16.2.0", "react-dom": "^16.2.0", "react-i18next": "^7.3.6", "react-mortal": "^3.2.0", "react-motion": "^0.5.2", "react-qr-reader": "^2.0.1", "react-redux": "^5.0.6", + "react-router": "^4.2.0", "react-router-dom": "^4.2.2", "react-router-redux": "5.0.0-alpha.9", - "react-router": "^4.2.0", "react-smooth-scrollbar": "^8.0.6", - "react": "^16.2.0", "recharts": "^1.0.0-beta.10", + "redux": "^3.7.2", "redux-actions": "^2.2.1", "redux-thunk": "^2.2.0", - "redux": "^3.7.2", "smooth-scrollbar": "^8.2.6", "source-map-support": "^0.5.3", "styled-components": "^3.1.6", @@ -127,6 +127,7 @@ "eslint-plugin-react": "^7.6.1", "flow-bin": "^0.65.0", "flow-typed": "^2.3.0", + "hard-source-webpack-plugin": "^0.5.18", "husky": "^0.14.3", "lint-staged": "^6.1.0", "node-loader": "^0.6.0", diff --git a/webpack/renderer.config.js b/webpack/renderer.config.js index d3413d07..b237d98b 100644 --- a/webpack/renderer.config.js +++ b/webpack/renderer.config.js @@ -1,7 +1,9 @@ +const HardSourceWebpackPlugin = require('hard-source-webpack-plugin') + const plugins = require('./plugins') const config = { - plugins, + plugins: [...plugins, new HardSourceWebpackPlugin()], devServer: { historyApiFallback: true, }, diff --git a/yarn.lock b/yarn.lock index 28913d52..7b534e46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -489,6 +489,10 @@ alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" @@ -3145,6 +3149,10 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + detect-libc@^1.0.2, detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4624,6 +4632,20 @@ har-validator@~5.0.3: ajv "^5.1.0" har-schema "^2.0.0" +hard-source-webpack-plugin@^0.5.18: + version "0.5.18" + resolved "https://registry.yarnpkg.com/hard-source-webpack-plugin/-/hard-source-webpack-plugin-0.5.18.tgz#4f328e344ad5305227c7db526d5365e8d7786712" + dependencies: + lodash "^4.15.0" + mkdirp "^0.5.1" + node-object-hash "^1.2.0" + rimraf "^2.6.2" + source-list-map "^0.1.6" + source-map "^0.5.6" + webpack-core "~0.6.0" + webpack-sources "^1.0.1" + write-json-file "^2.3.0" + has-ansi@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e" @@ -6274,6 +6296,10 @@ node-loader@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/node-loader/-/node-loader-0.6.0.tgz#c797ef51095ed5859902b157f6384f6361e05ae8" +node-object-hash@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/node-object-hash/-/node-object-hash-1.3.0.tgz#7f294f5afec6b08d713e40d40a95ec793e05baf3" + node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" @@ -8452,6 +8478,16 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^0.1.6, source-list-map@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" @@ -8490,6 +8526,12 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +source-map@~0.4.1: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + spawn-command@^0.0.2-1: version "0.0.2-1" resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" @@ -9386,6 +9428,13 @@ wbuf@^1.1.0, wbuf@^1.7.2: dependencies: minimalistic-assert "^1.0.0" +webpack-core@~0.6.0: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.12.2: version "1.12.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" @@ -9585,6 +9634,17 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" +write-json-file@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^3.0.0" + sort-keys "^2.0.0" + write-file-atomic "^2.0.0" + write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"