plone / volto

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

Volto monorepo installs and tries to compile too many packages from package folder #6417

Open ichim-david opened 1 month ago

ichim-david commented 1 month ago

Describe the bug I have a monorepo style package created and volto is cloned within core package. I have added a new add-on to mrs.developer.json and I want to clone it so I run: make install On a mac I get the following error as seen in this gist https://gist.github.com/ichim-david/7748ad9cd6c7c7fd15542e48d7f422f8

Expected behavior I have no immediate need for plone/components in my Volto 18 project and If I look at the package.json of packages/volto I see the following workspace requirements

"@plone/registry": "workspace:*",
"@plone/scripts": "workspace:*",
"@plone/volto-slate": "workspace:*",
"@plone/types": "workspace:*",
"@plone/volto-coresandbox": "workspace:*",

We load within the pnpm-lock all of the alpha packages that are WIP for Volto but that doesn't mean that they should be installed on a production system where you only need Volto itself. They bring many packages that might not be needed by volto itself further bloating a potential production image eventually.

https://github.com/plone/cookieplone-templates/blob/main/frontend_addon/%7B%7B%20cookiecutter.__folder_name%20%7D%7D/Makefile#L60 From cookieplone template we compile plone/components when we want to install due it being place within build-deps command.

I think this whole thing should be more opt-in instead of opt out when we create a new project and not develop Volto core.