Skip to content

Conversation

iobuhov
Copy link
Contributor

@iobuhov iobuhov commented Jul 15, 2025

Bundling widgets with rolldown

New build cli that uses rolldown. Should be just drop in replacement for "build" and "start" commands
It should be a drop in replacement. Here is the list of features that I already covered:

  • Bundling widget code
  • Bundling editorConfig
  • Bundling editorPreview
  • Images extraction
  • CSS extraction
  • Typings generator
  • MX_PROJECT_PATH support
  • MPKOUTPUT support
  • minification (alpha)
  • full watch mode
  • build for native (this needs implementation by mobile team)
  • widget deply to target project
  • mpk archive

Gotchas

  • Have issue with ValueStauts const enum exported from "mendix" package. Can be solved by replacing all uses of enum with appropriate strings (e.g. VaueStauts.Loading => "loading")
    Also, it's good idea to set "isolatedModule: true" in typescript config
  • Absolute exports show warnigns (e.g. 'src/utils/dom') and will not be considered as externals.

To test

$ cd packages/mpx
$ pnpm install
$ pnpm pack

And then use tarball to install it to the widget

@iobuhov iobuhov requested a review from a team as a code owner July 15, 2025 09:02
@iobuhov iobuhov changed the title Mpx [WIP] mpx - bundling with rolldown Jul 15, 2025
@iobuhov iobuhov changed the title [WIP] mpx - bundling with rolldown mpx - bundling with rolldown Jul 17, 2025
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