From 295f784ed8ac761430e5f801c71b0647e0e10ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 1 Apr 2025 12:09:54 +0200 Subject: [PATCH] feat: avoid pulling entire lodash library into build 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 ddb0745d7..4a8b78b09 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) && (