From 61a5ea246649f0aba3e5e19145523e47c5fbac11 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 30 Mar 2023 20:29:00 -0500 Subject: [PATCH] Follow-up --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index f2e19ac6a..6eadef3c1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -141,14 +141,14 @@ module.exports = (_env, { mode = 'production' }) => { }, plugins: [ - ...(APP_ENV === 'staging' ? { + ...(APP_ENV === 'staging' ? [{ apply: (compiler) => { compiler.hooks.compile.tap('Before Compilation', async () => { const stats = await fetch(STATOSCOPE_REFERENCE_URL).then((res) => res.text()); fs.writeFileSync(path.resolve('./public/reference.json'), stats); }); }, - } : []), + }] : []), // Clearing of the unused files for code highlight for smaller chunk count new ContextReplacementPlugin( /highlight\.js[\\/]lib[\\/]languages/,