Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
This article describes how to extend a module definition file in Microsoft Dynamics 365 Commerce. For example, you can create an extended module of another module to add new configuration fields.
When you extend a property that is an object, you must extend the whole object. For example, to add a configuration property to your extended module, first copy the existing configuration properties from the parent module to the child module. Then add the desired property.
Examples
The following example of a module definition file shows how to extend a core module by using a $ref command to the core script injector module.
{
"$ref": "@d365-commerce-modules/core-components/dist/lib/modules/script-injector/script-injector.definition.json",
"friendlyName": "Analytics Service",
"name": "AnalyticsService"
...
}
The $ref command can also include a relative path to another module in your /src/modules/ directory.
{
"$ref": "../productFeature/productFeature.definition.json",
"friendlyName": "Extended Product Feature Module",
"name": "extendedProductFeature",
"config": {
"extendedProductData": {
"friendlyName": "Extended Product Data",
"description": "Additional product data.",
"type": "string"
}
}
}
After deployment, both the base module and the extended module appear in Microsoft Dynamics 365 Commerce.
Additional resources
Interactive components overview
Mock the signed-in state during local development
Configure module properties to be shown based on context