aem-react icon indicating copy to clipboard operation
aem-react copied to clipboard

multiple react content packages

Open stemey opened this issue 9 years ago • 2 comments

Currently it is not possible to install multiple content packages that include react components in a single AEM instance - at least with the build process in the archetype. The reason is that the basic react functionality from aem-react-js is bundled with the react components.

TODOs

  1. chunks Separate base functionality into common chunk. The bundled javascript must be separated into separate chunks. One chunk contains the common functionality and then there will be a chunk for each content package.
  2. versions Additionally we need to take into account different versions of aem-react-js. Each content package is compiled against a specific version, while the script engine can currently only use a single. It is possible to support different versions of aem-react-js inside the script engine but then the contained react components cannot be rendered in the same react component tree.
  3. deployment Each content package could deploy a react script engine client. All clients are managed by the single script engine. The script engine consult the client which contains the react component before rendering. If there are multiple clients with the same aem-react-js dependency then the they shoudl be rendered in a single javascript engine. Hence there will be javascript engines specific to aem-react-js version. The ReactParsys must also include child components dependeing on their compatibilty with the current javascript engine.

stemey avatar Oct 22 '16 07:10 stemey

Is there any update on splitting current single big bundle into smaller chunks (e.g. per component)?

lukaszwilk avatar Feb 19 '18 10:02 lukaszwilk

No, this is still unresolved.

stemey avatar Feb 20 '18 09:02 stemey