How should I get the mainComponent of the detached component in Dev Mode?

The figma.importComponentByKeyAsync() method cannot be used under devMode, how should I get the mainComponent of the detached component in devMode mode?

As a possible way, try to find an instance in the document whose main component has the same key.

Thank you for your reply. There seems to be no better way at the moment.