From 1838bf481cdf1ad19a29dd9f5a8211b2b7fe3b3a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 17 Oct 2024 01:16:56 +0300 Subject: [PATCH] webpack: Cache bundles to filesystem --- webpack.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 8f2ef021f..842a60ceb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,8 +1,14 @@ +import process from 'node:process'; +import path from 'node:path'; + /** @type {import('webpack').Configuration} */ export const publicLibConfig = { mode: 'production', entry: './public/lib.js', - cache: true, + cache: { + type: 'filesystem', + cacheDirectory: path.resolve(process.cwd(), 'dist/webpack'), + }, devtool: false, module: {}, stats: {