feat(bundler): add Aliases option for spec import resolution

Specs import from "@uatu/spec"; the bundler maps that to the
vendored pkg/spec-api/src/index.ts via esbuild's Alias map.
This commit is contained in:
pj committed 2026-04-18 00:08:31 +07:00
1 parent 8c6a3171d7
commit 7aa75f3d9f
2 files changed
+27

No files matched your search

+2
View File
@@ -14,6 +14,7 @@ import (
type Options struct {
EntryFile string
Defines map[string]string
Aliases map[string]string
Sourcemap bool
}
@@ -51,6 +52,7 @@ func Bundle(options Options) (Result, error) {
Target: esbuild.ES2020,
Platform: esbuild.PlatformNeutral,
Define: defines,
Alias: options.Aliases,
Sourcemap: sourcemap,
Write: false,
LogLevel: esbuild.LogLevelSilent,