Skip to content

Commit b03dbc2

Browse files
try fix e2e
1 parent db13d24 commit b03dbc2

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

tools/build/build.dart

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,22 +212,8 @@ String? _searchEntryPoints(String exampleDir, List<String> remaining) {
212212
String finalOutput,
213213
String target,
214214
) {
215-
// Mobile (React Native) uses Hermes, not Node.js - skip preamble
216-
return target == 'mobile'
217-
? _copyWithoutPreamble(tempOutput, finalOutput)
218-
: _prependPreamble(tempOutput, finalOutput);
219-
}
220-
221-
({bool isSuccess, String message}) _copyWithoutPreamble(
222-
String tempOutput,
223-
String finalOutput,
224-
) {
225-
print(' Finalizing for React Native (no preamble)...');
226-
final compiledJs = File(tempOutput).readAsStringSync();
227-
File(finalOutput).writeAsStringSync(compiledJs);
228-
File(tempOutput).deleteSync();
229-
print(' Build complete: $finalOutput');
230-
return (isSuccess: true, message: 'Build successful');
215+
// All targets need preamble - dart2js requires self.* globals
216+
return _prependPreamble(tempOutput, finalOutput);
231217
}
232218

233219
({bool isSuccess, String message}) _prependPreamble(

0 commit comments

Comments
 (0)