File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments