Skip to content

Commit 7113409

Browse files
committed
retrieves transform path
1 parent 9f88109 commit 7113409

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/cli/src/main.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export default async function main(paths: string[], flags: Flags) {
4747

4848
const config = await fetchConfigAtPath(configFilePath);
4949
const answers = await inquirer.prompt([getTransformPrompt(config)]);
50-
transforms.push(answers.transform);
50+
51+
if (config.transforms && config.transforms[answers.transform]) {
52+
transforms.push(config.transforms[answers.transform]);
53+
} else if (config.presets && config.presets[answers.transform]) {
54+
transforms.push(config.presets[answers.transform]);
55+
}
5156
}
5257

5358
if (paths.length === 0) {

0 commit comments

Comments
 (0)