overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

feat: additional patches before npm build in the Dockerfile #146

Closed MoisesGSalas closed 1 year ago

MoisesGSalas commented 1 year ago

Description

Add additional patches just before the build step similar to the mfe-dockerfile-pre-npm-install patches. This will allow running additional instructions before building the assets (e.g. adding new ENV ... lines to enable new relic).

I'm not sure if a 'post build' patch would be useful.

MoisesGSalas commented 1 year ago

I don't see any particular reason why it couldn't go on {{ app_name }}-common, I will move the patches.

The motivation is to be able to set/modify any environment variable right before the build step. I made changes in frontend-build while exploring this topic and included an additional variable and realized there wasn't an easy way to set variables before building.

I thought this may be a useful change if you are using a custom MFE or, as I said previously, you want to configure newrelic support. I don't know if it could also help with this issue.