How do I disable core modules? #12638
-
I am trying to build a customized system that will link to e-commerce websites and an ERP. Due to the nature of the project, some of the commerce modules are redundant and I would like to remove them. After a lot of searching and going through the documentation, I could not find a way to do it in the current version. But it seems that it was possible in the older versions by removing the dependencies from the package JSON. Was the feature removed or is there some new way of doing it now? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The feature is still available in the current version, but it's implemented differently than in older versions.The available core modules that you can disable include:
In your medusa-config.js or medusa-config.ts file, you can disable modules in two waysFile Location :
module.exports = {
modules: {
[Modules.PRODUCT]: false, // This will disable the product module
[Modules.CART]: false, // This will disable the cart module
// ... other modules
}
}
module.exports = {
modules: {
[Modules.PRODUCT]: {
disable: true
},
[Modules.CART]: {
disable: true
}
// ... other modules
}
} |
Beta Was this translation helpful? Give feedback.
The feature is still available in the current version, but it's implemented differently than in older versions.
The available core modules that you can disable include:
And more...
In your medusa-config.js or medusa-config.ts file, you can disable modules in two ways
File Location :
medusa/packages/core/types/src/common/config-module.ts
medusa/integration-tests/modules/medusa-config.js