File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/react-native-builder-bob/src/utils Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,9 @@ export default async function compile({
108108
109109 // If codegen is used in the app, then we need to preserve TypeScript source
110110 // So we copy the file as is instead of transforming it
111- if ( isCodegenSpec ( filepath ) ) {
111+ const codegenEnabled = 'codegenConfig' in pkg ;
112+
113+ if ( codegenEnabled && isCodegenSpec ( filepath ) ) {
112114 fs . copy ( filepath , path . join ( output , path . relative ( source , filepath ) ) ) ;
113115 return ;
114116 }
@@ -123,7 +125,7 @@ export default async function compile({
123125 : false ,
124126 rewriteImportExtensions : esm ,
125127 jsxRuntime,
126- codegenEnabled : 'codegenConfig' in pkg ,
128+ codegenEnabled,
127129 } ,
128130 cwd : root ,
129131 babelrc : babelrc ,
You can’t perform that action at this time.
0 commit comments