feat: adds support for loading external theme CSS for MFEs
Description:
This PR updates the original one https://github.com/openedx/frontend-platform/pull/440 closer to the master branch and adds some extra tests.
Please read the original PR for additional context.
[!WARNING] The dist folder is included in the PR for testing purposes and will be removed before the merge.
Merge checklist:
- [x] Consider running your code modifications in the included example app within
frontend-platform. This can be done by runningnpm startand opening http://localhost:8080. - [x] Consider testing your code modifications in another local micro-frontend using local aliases configured via the
module.config.jsfile infrontend-build. - [ ] Verify your commit title/body conforms to the conventional commits format (e.g.,
fix,feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.
Post merge:
- [ ] After the build finishes for the merged commit, verify the new release has been pushed to NPM.
Thanks for the pull request, @dcoa!
What's next?
Please work through the following steps to get your changes ready for engineering review:
:radio_button: Get product approval
If you haven't already, check this list to see if your contribution needs to go through the product review process.
- If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
- This process (including the steps you'll need to take) is documented here.
- If it doesn't, simply proceed with the next step.
:radio_button: Provide context
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
- Dependencies
This PR must be merged before / after / at the same time as ...
- Blockers
This PR is waiting for OEP-1234 to be accepted.
- Timeline information
This PR must be merged by XX date because ...
- Partner information
This is for a course on edx.org.
- Supporting documentation
- Relevant Open edX discussion forum threads
:radio_button: Get a green build
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
:radio_button: Let us know that your PR is ready for review:
Who will review my changes?
This repository is currently maintained by @openedx/committers-frontend. Tag them in a comment and let them know that your changes are ready for review.
Where can I find more information?
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
- Overview of Review Process for Community Contributions
- Pull Request Status Guide
- Making changes to your pull request
When can I expect my changes to be merged?
Our goal is to get community contributions seen and reviewed as efficiently as possible.
However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
- The size and impact of the changes that it introduces
- The need for product review
- Maintenance status of the parent repository
:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.
Codecov Report
Attention: Patch coverage is 83.90093% with 52 lines in your changes missing coverage. Please review.
Project coverage is 83.64%. Comparing base (
bc9c233) to head (837858e).
Additional details and impacted files
@@ Coverage Diff @@
## master #689 +/- ##
==========================================
+ Coverage 83.41% 83.64% +0.23%
==========================================
Files 40 48 +8
Lines 1073 1388 +315
Branches 197 290 +93
==========================================
+ Hits 895 1161 +266
- Misses 166 211 +45
- Partials 12 16 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@dcoa I'm getting an error during build related to the env.config.js file
SyntaxError: Unexpected token 'export'
I tried to solve it by changing the export to module.exports = { config }; I succeeded, but the content of the example application is not rendered on http://localhost:8080.
Have you encountered such a problem?
@PKulkoRaccoonGang this is related to frontend-build changes, I'm checking right now
This line is making that the app is not rendering in frontend-platform https://github.com/openedx/frontend-build/pull/546/files#diff-22e13ddf245ea4fa81ca4d686dddf46fa9cbf70fbbff99991cccbf0c8ff82316R175
If you remove it, you will be able to see the app.
Update
I made an update to webpack dev config for example app and is working now.
@davidjoy, this is a doozy to keep an eye on.
Sure is. It looks like it was temporary, but just to explicitly note it: the dist folder has been checked in in this PR. We need to remember to remove that before merging.