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({
108
108
109
109
// If codegen is used in the app, then we need to preserve TypeScript source
110
110
// 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 ) ) {
112
114
fs . copy ( filepath , path . join ( output , path . relative ( source , filepath ) ) ) ;
113
115
return ;
114
116
}
@@ -123,7 +125,7 @@ export default async function compile({
123
125
: false ,
124
126
rewriteImportExtensions : esm ,
125
127
jsxRuntime,
126
- codegenEnabled : 'codegenConfig' in pkg ,
128
+ codegenEnabled,
127
129
} ,
128
130
cwd : root ,
129
131
babelrc : babelrc ,
You can’t perform that action at this time.
0 commit comments