ARTEMIS-5999 - Switch from CJS to ESM build#189
Conversation
|
@GChuf thanks. I tried moving Hawtio (application built with Here are my notes from last year when I tried this: tsup, webpack and cjs/esm modulesI wanted to change But then webpack kind of do double conversion: The problems:
I had problems with double I still don't fully understand when you need the extension in the import/require statements but looks like I use extensionless imports. AFAIR, extensionless imports work well when Also about the icons - I didn't have problems with extensionless imports. If you check so I stayed with importing (c)js variants... And finally about removing deprecated components - I've migrated the Artemis console (my local, not-yet-pushed branch) to Patternfly 6, but didn't change the styles yet - and yes, it involves the Select/Dropdown component. I'd eventually suggest migrating to PF6 - especially because Hawtio 5 will be using Patternfly 6 (Patternfly 5 is no longer maintained). WDYT? |
|
@grgrzybek, thanks - About cjs/esm: I cannot remember all the errors I've encountered along the way, and I do not have any notes regarding the process anymore :) I agree that moving to PF6 makes sense, especialy if hawtio moves to PF6, even though sometimes it feels like updating everything all the time is done for its own sake. |
|
@GChuf hi - getting back to this oldish issue.
there are some quirks which mostly revolve around double default problem: https://www.typescriptlang.org/docs/handbook/modules/appendices/esm-cjs-interop.html#no-__esmodule-detection-the-double-default-problem - oh my, it was a painful journey. Ideally I'd really like to have Now I'm trying to update to new Module Federation 2.0 (see: hawtio/hawtio-react#2079) and after that I'll try to provide newer/more flexible configuration of ESM/CJS and will add more comments. |
|
I laughed at "icons" :) Godspeed! |
No description provided.