From 618143a91d38a0a185253afbdd1d75d5fab31b4b Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Thu, 19 Jul 2018 20:47:59 -0500 Subject: [PATCH] rev HardSource --- lib/pipeline/webpackProcess.js | 13 ++++++++++++- lib/process/processWrapper.js | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/pipeline/webpackProcess.js b/lib/pipeline/webpackProcess.js index f3f301c5..25b711f3 100644 --- a/lib/pipeline/webpackProcess.js +++ b/lib/pipeline/webpackProcess.js @@ -58,7 +58,18 @@ class WebpackProcess extends ProcessWrapper { externals: function (context, request, callback) { callback(); }, - plugins: [new HardSourceWebpackPlugin()] + plugins: [ + new HardSourceWebpackPlugin({ + cacheDirectory: fs.dappPath('node_modules/.cache/hard-source'), + // ufglify would still be saving under embark's node_modules/.cache + environmentHash: { + root: fs.dappPath() + } + }), + new HardSourceWebpackPlugin.ExcludeModulePlugin([{ + test: /app[\\/]|contracts[\\/]/ + }]) + ] }; let webpackOptions = utils.recursiveMerge(defaultOptions, options); diff --git a/lib/process/processWrapper.js b/lib/process/processWrapper.js index 9e399ffd..f045f3d8 100644 --- a/lib/process/processWrapper.js +++ b/lib/process/processWrapper.js @@ -66,7 +66,7 @@ class ProcessWrapper { _log(type, ...messages) { const isHardSource = messages.some(message => { - return (typeof message === 'string' && message.indexOf('hard-source') > -1); + return (typeof message === 'string' && message.indexOf('hardsource') > -1); }); if (isHardSource) { return;