Skip to content

Conversation

@mlaponder
Copy link
Collaborator

Checklist

  • Contains unit tests ❌
  • Contains breaking changes ❌
  • Compatible with: MX 7️⃣, 8️⃣, 9️⃣
  • Did you update version and changelog? ✅
  • PR title properly formatted ([XX-000]: description)? ✅

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

Fix transformation by the commonjs plugin in case the output format is es and an external library is required.

Relevant changes

For React client require statements to external libraries need to be rewritten to an import statement. However as the externally libraries were marked as ignore in the commonjs plugin configuration those require statements were left untouched, causing the runtime error "require is not defined".
This has been resolved by no longer marking external libraries as ignored.

What should be covered while testing?

Building widget which needs this transformation can be bundled and run without a custom rollup config. Examples are:
calendar-web
color-picker-web
document-viewer-web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants