Skip to content

Commit ad4baa4

Browse files
committed
update
1 parent 0a6118f commit ad4baa4

File tree

3 files changed

+7
-160
lines changed

3 files changed

+7
-160
lines changed

scripts/bundle-metadata-plugin.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ function setupHermescWrapper() {
127127
}
128128

129129
console.log('🔧 [Hermesc Setup] Starting hermesc wrapper setup...');
130+
131+
// 使用项目根目录来定位 hermesc
130132
const hermescLocations = [
131133
{
132134
path: path.join(PROJECT_ROOT, 'node_modules/react-native/sdks/hermesc/osx-bin/hermesc'),
@@ -138,6 +140,7 @@ function setupHermescWrapper() {
138140
}
139141
];
140142

143+
console.log('😁hermescLocations', hermescLocations);
141144
let successCount = 0;
142145
let totalProcessed = 0;
143146

@@ -153,6 +156,7 @@ function setupHermescWrapper() {
153156
}
154157

155158
function metadataSerializer(entryPoint, preModules, graph, options) {
159+
console.log('😁metadataSerializer - Starting bundle serialization');
156160
setupHermescWrapper();
157161
const baseJSBundle = require('metro/src/DeltaBundler/Serializers/baseJSBundle');
158162
const bundleToString = require('metro/src/lib/bundleToString');
@@ -161,6 +165,8 @@ function metadataSerializer(entryPoint, preModules, graph, options) {
161165
const contentHash = calculateContentHash(bundleCode);
162166
const metadataInjection = generateMetadataInjection(contentHash);
163167
const metadataComment = generateMetadataComment(contentHash);
168+
169+
// hash 文件保存在项目根目录
164170
const hashFilePath = path.join(PROJECT_ROOT, 'bundle-hash.json');
165171

166172
try {

scripts/hermesc-wrapper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ hermesc.on('close', (code) => {
4343
});
4444

4545
function processHBCFile(hbcFilePath) {
46+
// hash 文件在项目根目录
4647
const hashFilePath = path.join(PROJECT_ROOT, 'bundle-hash.json');
4748

4849
if (!fs.existsSync(hashFilePath)) {

scripts/process-hbc.js

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)