Skip to content

Commit

Permalink
Fix html output paths in 'build' mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoz committed Nov 26, 2023
1 parent 1434934 commit f087a83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-bats-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'esbd': patch
---

Fix html output paths in "build"
6 changes: 2 additions & 4 deletions packages/esbd/src/esbd-build.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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'));
Expand Down

0 comments on commit f087a83

Please sign in to comment.