Skip to content

fix: Build frontend package before publishing to npm#27

Merged
feanil merged 1 commit intomainfrom
feanil/fix_frontend_publish
Apr 8, 2026
Merged

fix: Build frontend package before publishing to npm#27
feanil merged 1 commit intomainfrom
feanil/fix_frontend_publish

Conversation

@feanil
Copy link
Copy Markdown
Contributor

@feanil feanil commented Apr 8, 2026

Summary

  • The @openedx/sample-plugin package was shipping raw JSX (main: src/index.jsx), which webpack in MFE builds cannot process since babel-loader excludes node_modules by default
  • Follows the same pattern as @openedx/frontend-plugin-framework: compile src/dist/ with fedx-scripts babel before publishing
  • Updates main to dist/index.js and adds files: ["dist"] so only compiled output is published to npm

The package was shipping raw JSX (main: src/index.jsx) which webpack in
MFE builds cannot process since babel-loader excludes node_modules by
default.

Follows the same pattern as @openedx/frontend-plugin-framework:
- Use fedx-scripts babel to compile src/ -> dist/ before publishing
- Set main to dist/index.js
- Add files: ["dist"] to publish only compiled output
- Add @openedx/frontend-build as a devDependency for fedx-scripts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.23%. Comparing base (c8c3634) to head (7d38530).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage   88.23%   88.23%           
=======================================
  Files          13       13           
  Lines         408      408           
  Branches       16       16           
=======================================
  Hits          360      360           
  Misses         40       40           
  Partials        8        8           
Flag Coverage Δ
unittests 88.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@feanil feanil marked this pull request as ready for review April 8, 2026 16:30
@feanil feanil merged commit ee86939 into main Apr 8, 2026
8 checks passed
@feanil feanil deleted the feanil/fix_frontend_publish branch April 8, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant