@@ -876,6 +876,7 @@ pub const BundleV2 = struct {
876
876
this.linker.options.ignore_dce_annotations = bundler.options.ignore_dce_annotations;
877
877
878
878
this.linker.options.banner = bundler.options.banner;
879
+ this.linker.options.footer = bundler.options.footer;
879
880
880
881
this.linker.options.experimental_css = bundler.options.experimental_css;
881
882
@@ -1478,6 +1479,7 @@ pub const BundleV2 = struct {
1478
1479
bundler.options.ignore_dce_annotations = config.ignore_dce_annotations;
1479
1480
bundler.options.experimental_css = config.experimental_css;
1480
1481
bundler.options.banner = config.banner.toOwnedSlice();
1482
+ bundler.options.footer = config.footer.toOwnedSlice();
1481
1483
1482
1484
bundler.configureLinker();
1483
1485
try bundler.configureDefines();
@@ -4602,6 +4604,7 @@ pub const LinkerContext = struct {
4602
4604
minify_syntax: bool = false,
4603
4605
minify_identifiers: bool = false,
4604
4606
banner: []const u8 = "",
4607
+ footer: []const u8 = "",
4605
4608
experimental_css: bool = false,
4606
4609
source_maps: options.SourceMapOption = .none,
4607
4610
target: options.Target = .browser,
@@ -8977,7 +8980,16 @@ pub const LinkerContext = struct {
8977
8980
j.ensureNewlineAtEnd();
8978
8981
// TODO: maybeAppendLegalComments
8979
8982
8980
- // TODO: footer
8983
+ if (c.options.footer.len > 0) {
8984
+ if (newline_before_comment) {
8985
+ j.pushStatic("\n");
8986
+ line_offset.advance("\n");
8987
+ }
8988
+ j.pushStatic(ctx.c.options.footer);
8989
+ line_offset.advance(ctx.c.options.footer);
8990
+ j.pushStatic("\n");
8991
+ line_offset.advance("\n");
8992
+ }
8981
8993
8982
8994
chunk.intermediate_output = c.breakOutputIntoPieces(
8983
8995
worker.allocator,
0 commit comments