We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7e18063 + 5c3a4e4 commit 06b2b5cCopy full SHA for 06b2b5c
src/Options.ts
@@ -1,6 +1,6 @@
1
import type { Options as SwcOptions } from "@swc/core";
2
3
-type SwcConfig = ".swcrc" | SwcOptions;
+export type SwcConfig = string | SwcOptions;
4
5
export interface RunOptions {
6
argv: string[];
src/SwcCompiler.ts
@@ -126,8 +126,11 @@ export class SwcCompiler implements Compiler {
126
127
let swcConfig: Options;
128
129
- if (!config.swc || config.swc === ".swcrc") {
130
- swcConfig = { swcrc: true };
+ if (!config.swc || typeof config.swc === "string") {
+ swcConfig = {
131
+ swcrc: true,
132
+ configFile: config.swc && config.swc !== ".swcrc" ? path.resolve(root, config.swc) : undefined,
133
+ };
134
} else if (config.swc === undefined) {
135
swcConfig = SWC_DEFAULTS;
136
} else {
0 commit comments