diff --git a/.changeset/twenty-bats-confess.md b/.changeset/twenty-bats-confess.md new file mode 100644 index 0000000..3c2479c --- /dev/null +++ b/.changeset/twenty-bats-confess.md @@ -0,0 +1,5 @@ +--- +'esbd': patch +--- + +Fix html output paths in "build" diff --git a/packages/esbd/src/esbd-build.ts b/packages/esbd/src/esbd-build.ts index 12be445..d5b7397 100644 --- a/packages/esbd/src/esbd-build.ts +++ b/packages/esbd/src/esbd-build.ts @@ -1,6 +1,6 @@ import type { TypecheckRunner as TypecheckRunnerCls } from '@jgoz/esbuild-plugin-typecheck'; import fs from 'fs'; -import { basename, dirname, relative } from 'path'; +import { dirname, relative } from 'path'; import pc from 'picocolors'; import prettyBytes from 'pretty-bytes'; @@ -55,9 +55,7 @@ async function esbdBuild(config: ResolvedEsbdConfig, options: EsbdBuildOptions) const { entryPoints } = config; const entries = Array.isArray(entryPoints) - ? entryPoints.map(p => - typeof p === 'object' ? ([basename(p.out), p.in] as const) : ([basename(p), p] as const), - ) + ? entryPoints.map(p => (typeof p === 'object' ? ([p.out, p.in] as const) : ([p, p] as const))) : Object.entries(entryPoints); const htmlEntries = entries.filter(([, entryPath]) => entryPath.endsWith('.html'));