0

I have a lightning component as part of a managed package that uses few custom labels. The custom labels are saved with the default namespace like {!$Label.c.label_name}. I am trying to update this line with the relevant namespace like {!$Label.nameSpace.label_name}. After changing the namespace and saving the component successfully, on refreshing the code reverts to to default namespace i.e. {!$Label.c.<label_name>}. Have looked at this question - Namespace replaced while saving a lightning component. Is this a known behaviour or bug? Could not find any official documentation.

1

It's a feature, not a bug. Your local code should always be referenced with the "c" namespace. When uploaded in a managed package, it will be referenced correctly. This feature allows you to develop your code in a non-namespaced org, then migrate to a managed package org without having to update your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.