INNER CODE UNIT · TypeScript
buildMetaContent
reactnativecn/react-native-update · harmony/hvigor-plugin.ts:116
export function buildMetaContent(
buildMode: string,
versionName: string,
now: number,
): { pushy_build_time: string; versionName: string } {
return {
pushy_build_time: buildMode.toLowerCase() === 'release' ? String(now) : '0',
versionName,
};
}
/**
* Writes rawfile/meta.json (pushy_build_time + versionName) into the module
* this plugin is applied to. The write happens in a build task that runs
* before resources are compiled, not in apply(): apply() runs on every hvigor
* invocation including IDE sync, and only assemble invocations register the
* task at all.
*/