rev HardSource

This commit is contained in:
Michael Bradley, Jr 2018-07-19 20:47:59 -05:00 committed by Iuri Matias
parent 25be46af2c
commit bb443b3882
2 changed files with 13 additions and 2 deletions

View File

@ -58,7 +58,18 @@ class WebpackProcess extends ProcessWrapper {
externals: function (context, request, callback) { externals: function (context, request, callback) {
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); let webpackOptions = utils.recursiveMerge(defaultOptions, options);

View File

@ -62,7 +62,7 @@ class ProcessWrapper {
_log(type, ...messages) { _log(type, ...messages) {
const isHardSource = messages.some(message => { const isHardSource = messages.some(message => {
return (typeof message === 'string' && message.indexOf('hard-source') > -1); return (typeof message === 'string' && message.indexOf('hardsource') > -1);
}); });
if (isHardSource) { if (isHardSource) {
return; return;