formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

Corrects ES Module exports in package.json

Open manuelroth opened this issue 1 year ago • 3 comments

This PR correct the ES Module exports in package.json

manuelroth avatar Aug 08 '24 18:08 manuelroth

I actually agree with this change, but us using "cjs" for "import" was changed deliberately. Using mjs was causing some downstream issues with our build process and was not working with applications using legacy versions. Maybe pulling in your other pull request will resolve that issue, so we will give it a try and see what happens downstream due to these changes.

travist avatar Aug 13 '24 14:08 travist

I think its also important to define the type and module properties. See https://github.com/formio/formio.js/pull/5736/commits/41130970e84c60e571467e3542ae20f0451296c6. This way bundlers will know which entrypoint to use for CommonJS and ES Module.

manuelroth avatar Aug 13 '24 20:08 manuelroth

Hi @travist , were you able to test the changes downstream?- We still have to keep the workaround described in https://github.com/formio/formio.js/issues/5735#issuecomment-2277265172 in place. I would be glad if we could remove it at some point. Therefore it would be great to know if you have made an progress on this issue. Kind regards, Manuel

manuelroth avatar Oct 16 '24 14:10 manuelroth

Hi @travist, we are trying to upgrade from formiojs to @formio/js (v4 -> v5). The issue described above still persists. The workaround described here: https://github.com/formio/formio.js/issues/5735#issuecomment-2277265172 doesn't work anymore with v5. Therefore we are now stuck with v4 and can't upgrade to v5 until this issue is resolved. Could you please look into this?

manuelroth avatar May 16 '25 14:05 manuelroth

Hello @manuelroth we will escalate this internally to see if we can reach some form of resolution.... thanks.

travist avatar May 16 '25 20:05 travist

We were able to find the real cause of the issue. See https://github.com/formio/formio.js/issues/5735 for more details. I will close this PR

manuelroth avatar Jun 05 '25 06:06 manuelroth