Skip to content

Commit 5fb1eb8

Browse files
authored
Fix issue with ignoring --source-file-name by CLI
Currently, if I provide the --source-file-name option to the CLI, it's ignored. This patch fixes the behavior and passes the argument to the CLI implementation.
1 parent 58cf286 commit 5fb1eb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cli/src/swc/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default async function ({
9494
}
9595

9696
async function handle(filename: string) {
97-
const sourceFileName = slash(
97+
const sourceFileName = swcOptions.sourceFileName ?? slash(
9898
cliOptions.outFile
9999
? path.relative(path.dirname(cliOptions.outFile), filename)
100100
: filename

0 commit comments

Comments
 (0)