Skip to content

Commit

Permalink
cleanup after landing #531
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Nov 16, 2020
1 parent 4f7b346 commit a1377d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

* Add the `--banner` and `--footer` options ([#482](https://github.com/evanw/esbuild/issues/482))

You can now use the `--banner` and `--footer` options to insert code before and/or after the code that esbuild generates. This is usually used to insert a banner comment at the top of your bundle. However, you can also use this for other purposes such as wrapping your whole bundle in `--banner='try {'` and `--footer='} catch (e) { reportError(e) }'`. Note that since these strings can contain partial JavaScript syntax, esbuild will not do anything to ensure the result is valid JavaScript syntax. This feature was contributed by [@Gelio](https://github.com/Gelio).

* Be more permissive inside TypeScript `declare` contexts

These cases are now allowed by esbuild:
Expand Down
4 changes: 2 additions & 2 deletions cmd/esbuild/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Options:
is browser and cjs when platform is node)
--splitting Enable code splitting (currently only for esm)
--global-name=... The name of the global for the IIFE format
--banner=... Text to be prepended to each output file
--footer=... Text to be appended to each output file
--minify Sets all --minify-* flags
--minify-whitespace Remove whitespace
Expand All @@ -48,6 +46,8 @@ Options:
Advanced options:
--version Print the current version and exit (` + esbuildVersion + `)
--banner=... Text to be prepended to each output file
--footer=... Text to be appended to each output file
--outbase=... The base path used to determine entry point output
paths (for multiple entry points)
--sourcemap=inline Emit the source map with an inline data URL
Expand Down

0 comments on commit a1377d3

Please sign in to comment.