Skip to main content
All CollectionsFor developers
How to develop an application for Uspacy?
How to develop an application for Uspacy?

In this article, we will explain how to develop your own application using the Module federation plugin technology

Uspacy Support Team avatar
Written by Uspacy Support Team
Updated over a month ago

We remind that Uspacy is built on an open API, which means developers can create their own solutions to extend the product’s standard capabilities.

How to do this using the Module federation plugin technology?

You need to configure Webpack and include the ModuleFederationPlugin in the plugins section.

Here are the key settings you'll need:

  • name – the name of your application.

  • filename – the name of the file that will be connected to the Uspacy space to render the application modules.

  • shared – a list of shared packages. Be sure to add the packages indicated in the screenshot and template as singletons in the shared list.

  • exposes – a list of modules that will be available in your application.

Each module must export a default component for rendering within the portal.

Additionally, you should configure the plugin with a settings component in the exposes section. This component will be displayed on the plugin settings page in the marketplace.

Make the necessary files public. After configuring the plugin, you need to make the necessary files available and provide a URL to the remoteEntry.js file. You should also include the name of your application (the name you specified in the ModuleFederationPlugin configuration) and list the available modules in your application. For example: https://your-domain.com/remoteEntry.js

Documentation on ModuleFederationPlugin ➡️ HERE

When developing with React, the version must be 18.0.0 or higher.

React application template can be found ➡️ HERE

Example of our application with a birthday widget ➡️ HERE

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Did this answer your question?