When we create AEM React SPA Archetype project (frontendModule="react") we get AEM SPA Editor JS SDK and the ootb React application (ui.frontend) based on the Create React App with core components with necessary mappings
- Is there a definite guide on how to migrate AEMs ui.frontend CRA to React Vite application?
- Any documentation on how to get there with Vite Plugin (aemvite.dev)?
Additionally, is it possible to upgrade from Webpack 4 to Webpack 5 in the context of AEM ui.frontend?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
There are hints suggesting that, for example https://www.aemvite.dev/guide/backend/clientlibs/#add-esmodule-htl-binding . You won't use HTL if this would be an SPA project, among others.
Hi,
There is no official guide to migrate from SPA archetypes to Vite. Technically, I think it is possible; however, some things are pre-configured to run smoothly with Webpack. For example, the manifest.json that SPA relies on is set and easy to configure in Webpack, whereas in Vite, you need to do extra configuration, etc.
From what I can read, VitePlugin is a different story. This plugin is meant for swapping Webpack in the regular archetype, not the SPA one, and the steps are described on the same page you posted. Please check here: https://www.aemvite.dev/guide/front-end/ .
Hope this helps
Thanks for a quick insight -
I couldn't confirm this statement, from the aem vite plugin documentation - This plugin is meant for swapping Webpack in the regular archetype - Where does this come from?
Thanks again
There are hints suggesting that, for example https://www.aemvite.dev/guide/backend/clientlibs/#add-esmodule-htl-binding . You won't use HTL if this would be an SPA project, among others.
@gangula2018 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies