From 435047caced9f10ef4210a19736f8c579c4691a7 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Tue, 21 May 2024 20:18:57 +0200 Subject: [PATCH] strip sinon, nise and bootstrap-vue icons --- website/client/vue.config.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/website/client/vue.config.js b/website/client/vue.config.js index a8b0467d33..750ff60e7d 100644 --- a/website/client/vue.config.js +++ b/website/client/vue.config.js @@ -5,6 +5,8 @@ const nconf = require('nconf'); const vueTemplateCompiler = require('vue-template-babel-compiler'); const setupNconf = require('../server/libs/setupNconf'); const pkg = require('./package.json'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const TerserPlugin = require("terser-webpack-plugin"); const configFile = path.join(path.resolve(__dirname, '../../config.json')); @@ -42,7 +44,19 @@ envVars const webpackPlugins = [ new webpack.DefinePlugin(envObject), - new webpack.ContextReplacementPlugin(/moment[\\/]locale$/, /^\.\/(NOT_EXISTING)$/), + new webpack.IgnorePlugin({ + checkResource(resource, context) { + if (context.includes('sinon') || context.includes('nise')) { + return true; + } + if (context.includes('bootstrap-vue')) { + if (resource.includes('/icons')) { + return true + } + } + return false; + }, +}), ]; module.exports = {