From fe7d1054f79540f26f3cd9807ee8600c511712d0 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Tue, 27 Nov 2018 06:20:18 +1100 Subject: [PATCH] Implemented some caching on the webpack compiler. --- private/webpack/WebpackCompiler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/private/webpack/WebpackCompiler.js b/private/webpack/WebpackCompiler.js index 3d8fd64..a302eca 100644 --- a/private/webpack/WebpackCompiler.js +++ b/private/webpack/WebpackCompiler.js @@ -27,7 +27,7 @@ const webpack = require('webpack'), JimpLoader = require('responsive-loader/jimp'), - //SharpLoader = require('responsive-loader/sharp'), + SharpLoader = require('responsive-loader/sharp'), HtmlWebpackPlugin = require('html-webpack-plugin'), TerserPlugin = require('terser-webpack-plugin'), MiniCssExtractPlugin = require("mini-css-extract-plugin"), @@ -67,7 +67,7 @@ module.exports = (isDev) => { test: /\.jsx?$/, exclude: /node_modules/, use: { - loader: 'babel-loader', + loader: 'babel-loader?cacheDirectory', options: { presets: [ [ @@ -154,7 +154,9 @@ module.exports = (isDev) => { }; } else { let TerserPluginConfig = new TerserPlugin({ - test: /\.js($|\?)/i + test: /\.js($|\?)/i, + cache: true, + parallel: true, }); let MiniCssExtractConfig = new MiniCssExtractPlugin({