Ensure consuming projects install @edx/brand
as the @edx/brand-openedx
package by default
#2240
Closed
3 tasks done
Labels
There was a recent question posed in the Open edX frontend working group Slack channel:
The reporter mentioned their colleague went through all MFEs and noticed the only MFE without the
brand-openedx
package installed by default isfrontend-app-gradebook
.At a higher level, many 2U/edX engineers who work on MFEs only want to run their apps using the
brand-edx.org
theme so their local environment matches what they will see on stage/production. To do this, consumers often install@edx/brand-edx.org
as the default theme, and forget to change it back to the default, open-source friendly@edx/brand-openedx
theme before committing/pushing.In theory, we may also be able to encourage consumers to override the
@edx/brand
package viamodule.config.js
instead. We should check to see whethermodule.config.js
works with@edx/brand
overrides, too.It's also worth mentioning some MFEs get around this by defining
install-theme
,start:with-theme
, andbuild:with-theme
NPM scripts that overrides the default@edx/brand
package via a custom brand package through theTHEME
environment variable (source). This solution as implemented still hardcodes@edx/brand-edx.org
as the custom theme, though, which is not ideal.I believe we could adapt these
install-theme
,start:with-theme
,build:with-theme
NPM scripts to be more generic and avoid hardcoding@edx/brand-edx.org
anywhere in the repos by relying on consuming to passTHEME="@edx/brand-edx.org"
themselves when runningnpm run start:with-theme
ornpm run build:with-theme
(e.g.,THEME="@edx/brand-edx.org" npm run start:with-theme
.Acceptance Criteria
The text was updated successfully, but these errors were encountered: