@@ -37,8 +37,6 @@ module.exports = function (api, options = {}) {
3737 return require ( resolvedPath ) ;
3838 } ;
3939
40- // --- Helper Functions ---
41-
4240 // Function to generate paths for bundled renderer files
4341 const createRendererPath = ( rendererFileName , version ) => {
4442 try {
@@ -116,8 +114,6 @@ module.exports = function (api, options = {}) {
116114
117115 let injected = false ;
118116
119- // This MUST be the first check.
120-
121117 if (
122118 isTransforming ( 'react-native/Libraries/Renderer/implementations/ReactFabric-dev.js' ) ||
123119 isTransforming ( 'react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js' )
@@ -130,7 +126,6 @@ module.exports = function (api, options = {}) {
130126 if ( rendererPath && fs . existsSync ( rendererPath ) ) {
131127 try {
132128 const rendererCode = fs . readFileSync ( rendererPath , 'utf8' ) ;
133- // Add a fingerprint to verify the custom renderer is loaded.
134129 const fingerprint = `globalThis.__RADON_RENDERER_LOADED__ = '${ path . basename ( rendererPath ) } ';` ;
135130 const finalRendererCode = `${ fingerprint } \n${ rendererCode } ` ;
136131
@@ -168,8 +163,6 @@ module.exports = function (api, options = {}) {
168163
169164 const finalCodeToInject = `${ portInjectionCode } \n${ runtimeCode } ` ;
170165
171- // By appending the code to the end of the file and wrapping in setImmediate,
172- // we ensure all polyfills are ready before our code runs.
173166 const finalSafeCode = `setImmediate(() => { try { \n${ finalCodeToInject } \n } catch (e) { console.error('Radon runtime error:', e); } });` ;
174167
175168 injectCode ( programPath , finalSafeCode , false ) ; // Append to the end
@@ -179,7 +172,6 @@ module.exports = function (api, options = {}) {
179172 console . error ( '🔥 RADON BABEL PLUGIN: 🚨 FAILED TO READ RUNTIME BUNDLE.' , e ) ;
180173 throw e ;
181174 }
182- // Once handled, we are done with this file.
183175 return ;
184176 }
185177
@@ -196,7 +188,6 @@ module.exports = function (api, options = {}) {
196188 }
197189 }
198190
199- // Process page files for navigation auto-registration
200191 processPageFile ( filename , programPath , parse , t , state ) ;
201192 } ,
202193 } ,
0 commit comments