From 9abe0c681a2f504d8c6447e47dc2db12a9f29be4 Mon Sep 17 00:00:00 2001 From: Shubham Kanodia Date: Wed, 2 Aug 2023 10:46:58 +0530 Subject: [PATCH] Ensure terser cache resides with other caches --- src/config/makeWebpackConfig.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config/makeWebpackConfig.ts b/src/config/makeWebpackConfig.ts index ec3b525..16f83b5 100644 --- a/src/config/makeWebpackConfig.ts +++ b/src/config/makeWebpackConfig.ts @@ -3,6 +3,7 @@ import TerserPlugin from 'terser-webpack-plugin' import MiniCssExtractPlugin from 'mini-css-extract-plugin' import CssoWebpackPlugin from 'csso-webpack-plugin' import WriteFilePlugin from 'write-file-webpack-plugin' +import path from 'path' const log = require('debug')('bp:webpack') import escapeRegex from 'escape-string-regexp' @@ -13,6 +14,7 @@ import { ESBuildMinifyPlugin } from 'esbuild-loader' import VueLoaderPlugin from 'vue-loader/lib/plugin' import { Externals } from '../common.types' +import config from './config' type MakeWebpackConfigOptions = { packageName: string @@ -88,6 +90,7 @@ export default function makeWebpackConfig({ ? [ new TerserPlugin({ parallel: true, + cache: path.join(config.tmp, 'cache', 'terser-cache'), terserOptions: { ie8: false, output: {