From f031ac743038fbe1cfe1142c50149993368ac93c Mon Sep 17 00:00:00 2001 From: leaysgur <6259812+leaysgur@users.noreply.github.com> Date: Tue, 31 Mar 2026 05:41:04 +0000 Subject: [PATCH] feat(cli/fmt): Export JS API from `oxfmt` under `vite-plus/fmt` (#1235) Add new `vite-plus/fmt` exports. --- packages/cli/package.json | 4 ++++ packages/cli/src/fmt.ts | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 packages/cli/src/fmt.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index b1b50e298e..160ab25074 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -66,6 +66,10 @@ "import": "./binding/index.cjs", "require": "./binding/index.cjs" }, + "./fmt": { + "types": "./dist/fmt.d.ts", + "import": "./dist/fmt.js" + }, "./lint": { "types": "./dist/lint.d.ts", "import": "./dist/lint.js" diff --git a/packages/cli/src/fmt.ts b/packages/cli/src/fmt.ts new file mode 100644 index 0000000000..681820486c --- /dev/null +++ b/packages/cli/src/fmt.ts @@ -0,0 +1,2 @@ +export { format } from 'oxfmt'; +export type * from 'oxfmt';