From ed379258a862607b4e7c3fb76a09baccb1d92ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 2 Apr 2025 14:52:10 +0200 Subject: [PATCH 1/3] feat: avoid pulling entire lodash library into build (#515) Importing from lodash was causing the entire library to be pulled. This change reduces the compressed production build size of frontend-app-profile by 6kB. --- src/components/studio-footer/StudioFooter.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/studio-footer/StudioFooter.jsx b/src/components/studio-footer/StudioFooter.jsx index ddb0745d..4a8b78b0 100644 --- a/src/components/studio-footer/StudioFooter.jsx +++ b/src/components/studio-footer/StudioFooter.jsx @@ -1,5 +1,5 @@ import React, { useContext, useState } from 'react'; -import _ from 'lodash'; +import isEmpty from 'lodash/isEmpty'; import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n'; import { ensureConfig } from '@edx/frontend-platform'; import { AppContext } from '@edx/frontend-platform/react'; @@ -88,7 +88,7 @@ const StudioFooter = ({ > - {!_.isEmpty(config.SUPPORT_EMAIL) && ( + {!isEmpty(config.SUPPORT_EMAIL) && (