How to use @edx/brand in local development and production

Hello @Faizan_Shaikh ,

Please tell me more about which custom plugin hook you are using and how you are using it.

Yes, it is possible to change the brand package locally and see the changes immediately in the tutor dev mode. Follow the steps for this:

  • Clone your MFE code and brand-openedx repo in the same folder
main-folder
     |________brand-openedx
     |
     |________authn-mfe
  • Mount your authn-mfe code to /openedx/app and brand-openedx to /openedx/brand-openedx
  • Now, in your authn-mfe folder, add the file name module.config.js and add the below content:
   module.exports = {
    localModules: [
     { moduleName: '@edx/brand', dir: '../brand-openedx'  },
    ],
  };
  • Then start tutor dev start authn and make changes to brand-openedx. Those will reflect automatically.
  • Sometimes, changes won’t reflect as your page will show the cached version. In this case, you can run tutor dev restart authn and simply reload the page. My recommendation to you is to use incognito mode of browser.
1 Like