refactor: unwrap ConfigPlugin namespace to flat exports + self-reexport (#22876)

This commit is contained in:
Kit Langton
2026-04-16 16:59:17 -04:00
committed by GitHub
parent 86c54c5acc
commit 32548bcb4a
+3 -3
View File
@@ -4,7 +4,6 @@ import { pathToFileURL } from "url"
import { isPathPluginSpec, parsePluginSpecifier, resolvePathPluginTarget } from "@/plugin/shared"
import path from "path"
export namespace ConfigPlugin {
const Options = z.record(z.string(), z.unknown())
export type Options = z.infer<typeof Options>
@@ -25,7 +24,7 @@ export namespace ConfigPlugin {
}
export async function load(dir: string) {
const plugins: ConfigPlugin.Spec[] = []
const plugins: Spec[] = []
for (const item of await Glob.scan("{plugin,plugins}/*.{ts,js}", {
cwd: dir,
@@ -81,4 +80,5 @@ export namespace ConfigPlugin {
return list.toReversed()
}
}
export * as ConfigPlugin from "./plugin"