决定 集成级别 您希望在外部SPA和AEM之间使用,通常可以清楚地看到并编辑AEM中的SPA。 RemotePage组件是一个自定义页面组件,仅用于此目的。
RemotePage组件从应用程序生成的所有必需资产中获取 asset-manifest.json
并将其用于在AEM中渲染SPA。
请参阅文章 在AEM中编辑外部SPA 有关AEM中可编辑外部SPA的更多详细信息。
asset-manifest.json
在 entrypoints property
要加载的所有CSS和JS文件:
https://github.com/shellscape/webpack-manifest-plugin
https://github.com/webdeveric/webpack-assets-manifest
https://github.com/mugi-uno/parcel-plugin-bundle-manifest
<div id="root"></div>
在 body
元素。 如果应用程序要实例化需要其他标记,则必须在具有 sling:resourceSuperType="spa-project-core/components/remotepage
.与AEM SPA项目的其余部分一样, RemotePage组件是开源组件。 有关RemotePage组件的完整技术详细信息,请 请参阅GitHub存储库。