plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
486 stars 661 forks source link

Fix types, better exports and use tsup for build, remove parcel #6461

Closed sneridagh closed 2 weeks ago

sneridagh commented 2 weeks ago

We are having problems in some setups in macos where parcel errors with a segmentation fault and we found also some weird errors related with it in pnpm lock, where the lock keeps updating because of it (apparently, their entries in the lock keep cycling infinitely). In addition, the resultant code has some weird names with a looong hash that end up in the dev tools. Then I also learned that tsup is more pure with their outputs and it was the recommended setup, see:

https://www.totaltypescript.com/how-to-create-an-npm-package

Totally worth it from top to bottom.

I also fixed the remaining types that forced us to ||true in the build output. So overall this PR improves the current situation, in a non-breaking way.

netlify[bot] commented 2 weeks ago

Deploy Preview for plone-components canceled.

Name Link
Latest commit 4ac8e2e5c1ff5e221e41542fe00d3f3cb511583d
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/6729072b1deec6000843f296
sneridagh commented 2 weeks ago

@davisagli just added some more background in the description.

sneridagh commented 2 weeks ago

@stevepiercy no, always in automated build processes, but they could see when it failed.

sneridagh commented 2 weeks ago

BTW, @davisagli @stevepiercy in the next days, probably I will be replacing (if possible) parcel with tsup in all our builds