717 B
717 B
Add Module Federation Env Var to Target Defaults
Add NX_MF_DEV_REMOTES to inputs for task hashing when @nx/webpack:webpack or @nx/rspack:rspack is used for Module Federation.
Sample Code Changes
{% tabs %} {% tab label="Before" %}
{
"targetDefaults": {
"@nx/webpack:webpack": {
"inputs": ["^build"]
}
}
}
{% /tab %} {% tab label="After" %}
{
"targetDefaults": {
"@nx/webpack:webpack": {
"cache": true,
"dependsOn": ["^build"],
"inputs": [
"^build",
{
"env": "NX_MF_DEV_REMOTES"
}
]
}
}
}
{% /tab %} {% /tabs %}