From 0a1443c18faa7998be9deae2f3cfbaad2764f729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sun, 30 Jul 2017 11:26:00 -0700 Subject: [PATCH] Enable caching in webpack & babel Saves ~5s per build --- webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index b8bb088c5..aa2ac9156 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,7 @@ const fs = require("fs"); const CleanWebpackPlugin = require("clean-webpack-plugin"); const config = { + cache: true, context: path.resolve(__dirname, "assets/static"), // eslint-disable-line entry: { unsee: "./unsee.js", @@ -94,6 +95,7 @@ const config = { use: [ { loader: "babel-loader", options: { + cacheDirectory: true, presets: [ [ "es2015", { modules: false } ] ]