Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

JS Packages: Explore separate build for `stores` #35260

Open andrii-lysenko opened 7 months ago

andrii-lysenko commented 7 months ago

This is the follow-up for https://github.com/Automattic/jetpack/issues/35076.

Per @anomiex suggestion:

The next step towards the stores being a separate thing would be to build them as a separate bundle, that has a separate wp_register_script() call registering it, and then everything needing it depends on that bundle (maybe via some custom configuration on @wordpress/dependency-extraction-webpack-plugin)?

We'd probably want to put the separate bundle and the wp_register_script() call into a composer package. Possibly automattic/jetpack-assets if we don't want to create a new one just for it, although a new one would probably be cleaner.

andrii-lysenko commented 6 months ago

Moving this back to the backlog. If additional context would be required feel free to reach out to me or @anomiex.

manzoorwanijk commented 1 month ago

38877 an approach that can solve the problem we are trying to solve here.

anomiex commented 1 month ago

38877 is in fact an implementation of the suggestion quoted here. Some of the groundwork done for that will be useful when doing the same here.