Skip to content

Commit 574b782

Browse files
committed
fix: oxc non-transform output
1 parent 4e1c336 commit 574b782

File tree

1 file changed

+3
-4
lines changed
  • src/builders/transformers

1 file changed

+3
-4
lines changed

src/builders/transformers/oxc.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ export const oxcTransformer: Transformer = async (
8989
path: replaceExtension(input.path, config.extension),
9090
srcPath,
9191
extension: config.extension,
92-
declaration: config.declaration !== undefined,
93-
raw: config.transform === false,
9492
};
9593
const sourceOptions: ExternalOxcParserOptions = {
9694
lang: config.language,
@@ -119,7 +117,7 @@ export const oxcTransformer: Transformer = async (
119117
srcPath,
120118
contents: transformed.declaration,
121119
declaration: true,
122-
path: input.path.replace(KNOWN_EXT_RE, config.declaration),
120+
path: replaceExtension(input.path, config.declaration),
123121
});
124122
}
125123

@@ -128,7 +126,6 @@ export const oxcTransformer: Transformer = async (
128126
);
129127

130128
if (transformErrors.length > 0) {
131-
// console.log(sourceText);
132129
await writeFile(
133130
"build-dump.ts",
134131
`/** Error dump for ${input.srcPath} */\n\n` + sourceText,
@@ -143,6 +140,8 @@ export const oxcTransformer: Transformer = async (
143140
}
144141

145142
codeOutputFile.contents = transformed.code;
143+
} else {
144+
codeOutputFile.contents = sourceText;
146145
}
147146

148147
output.push(codeOutputFile);

0 commit comments

Comments
 (0)