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 82666a47..1a388385 100644 --- a/lib/process/processWrapper.js +++ b/lib/process/processWrapper.js @@ -62,7 +62,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;