We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d8077a commit add7678Copy full SHA for add7678
packages/react-native-builder-bob/src/utils/compile.ts
@@ -108,7 +108,9 @@ export default async function compile({
108
109
// If codegen is used in the app, then we need to preserve TypeScript source
110
// So we copy the file as is instead of transforming it
111
- if (isCodegenSpec(filepath)) {
+ const codegenEnabled = 'codegenConfig' in pkg;
112
+
113
+ if (codegenEnabled && isCodegenSpec(filepath)) {
114
fs.copy(filepath, path.join(output, path.relative(source, filepath)));
115
return;
116
}
@@ -123,7 +125,7 @@ export default async function compile({
123
125
: false,
124
126
rewriteImportExtensions: esm,
127
jsxRuntime,
- codegenEnabled: 'codegenConfig' in pkg,
128
+ codegenEnabled,
129
},
130
cwd: root,
131
babelrc: babelrc,
0 commit comments