Skip to content

Commit

Permalink
Removed excess file copy code in bundle process
Browse files Browse the repository at this point in the history
  • Loading branch information
hlanderdev committed Aug 20, 2024
1 parent b4cc735 commit 6a7fe6b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cmd/build/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ func Bundle(spaPath string) error {
if err := copyFile(tmpOutputFilePath, mainJsFilePath); err != nil {
return fmt.Errorf("\nCould not copy temp file to main.js in bundle process: %w\n", err)
}

tmpOutFile, err := os.Open(tmpOutputFilePath)
if err != nil {
return fmt.Errorf("\nCould not open temporary bundle output file: %w\n", err)
}
defer tmpOutFile.Close()

mainJsFile, err := os.OpenFile(mainJsFilePath, os.O_CREATE|os.O_WRONLY, 0755)
if err != nil {
return fmt.Errorf("\nCould recreate main.js file in bundle process: %w\n", err)
}
defer mainJsFile.Close()

if _, err := io.Copy(mainJsFile, tmpOutFile); err != nil {
return fmt.Errorf("\nCould write to main.js file in bundle process: %w\n", err)
}
}
return nil
}
Expand Down

0 comments on commit 6a7fe6b

Please sign in to comment.