4.2.3. Module Isolation

In this chapter, you'll learn how modules are isolated, and what that means for your custom development.

  • Modules can't access resources, such as services, from other modules.
  • You can use Medusa's tools, as explained in the next chapters, to extend a modules' features or implement features across modules.

How are Modules Isolated?#

A module is unaware of any resources other than its own, such as services or data models. This means it can't access these resources if they're implemented in another module.

For example, your custom module can't resolve the Product Module's main service or have direct relationships from its data model to the Product Module's data models.

How to Implement Custom Features Across Modules?#

In your Medusa application, you want to implement features that span across modules, or you want to extend an existing module's features and customize them for your own use case.

For example, you want to extend the Product Module to add new properties to the Product data model.

Medusa provides the tools to implement these use cases while maintaining isolation between modules.

The next chapters explain these tools and how to use them in your custom development.

Was this chapter helpful?