File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/react-native-builder-bob/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ yargs
282282 if ( esm ) {
283283 let replace = false ;
284284
285- const exports = {
285+ const exportsField = {
286286 '.' : {
287287 import : {
288288 ...( types . import ? { types : types . import } : null ) ,
@@ -295,9 +295,14 @@ yargs
295295 } ,
296296 } ;
297297
298+ if ( pkg . codegenConfig && ! pkg . codegenConfig . includesGeneratedCode ) {
299+ // @ts -expect-error The exports is not strictly types therefore it doesn't know about the package.json property
300+ exportsField [ './package.json' ] = './package.json' ;
301+ }
302+
298303 if (
299304 pkg . exports &&
300- JSON . stringify ( pkg . exports ) !== JSON . stringify ( exports )
305+ JSON . stringify ( pkg . exports ) !== JSON . stringify ( exportsField )
301306 ) {
302307 replace = (
303308 await prompts ( {
@@ -312,7 +317,7 @@ yargs
312317 }
313318
314319 if ( replace ) {
315- pkg . exports = exports ;
320+ pkg . exports = exportsField ;
316321 }
317322 }
318323
You can’t perform that action at this time.
0 commit comments