Skip to content

Commit

Permalink
fix: adjusted output paths to use dist
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywolf132 committed Sep 24, 2024
1 parent c0de72e commit bdba730
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/esbuild/esbuild.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ func (b *Bundler) Bundle() error {
}

func (b *Bundler) bundleEntry(sourcePath *utils.SourcePathResult, entry config.ExportEntry) error {
outfile := filepath.Join(b.config.DistDir, entry.OutputPath)

// Ensure the output directory exists
if err := os.MkdirAll(filepath.Dir(entry.OutputPath), 0755); err != nil {
if err := os.MkdirAll(filepath.Dir(outfile), 0755); err != nil {
return fmt.Errorf("failed to create output directory: %w", err)
}

Expand All @@ -86,7 +87,7 @@ func (b *Bundler) bundleEntry(sourcePath *utils.SourcePathResult, entry config.E

buildOptions := api.BuildOptions{
EntryPoints: []string{sourcePath.Input},
Outfile: entry.OutputPath,
Outfile: outfile,
Bundle: true,
Write: true,
Format: b.getFormat(entry.Type),
Expand Down

0 comments on commit bdba730

Please sign in to comment.