ISPN-4679 need to check if bundle is null from weak reference
Generate the component metadata file in the generated-resources directory, so that it doesn't force a recompile of the module every time.