Skip to content

Commit c0ce5ec

Browse files
josephperrottAndrewKushnir
authored andcommitted
refactor(bazel): hardcode esm as the ouput for rollup (angular#60306)
Remove the option as an arg for creating a rollup config since it is static. PR Close angular#60306
1 parent d5a1635 commit c0ce5ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/bazel/src/ng_package/ng_package.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ def _write_rollup_config(
184184

185185
return config
186186

187-
def _run_rollup(ctx, rollup_config, inputs, format):
187+
def _run_rollup(ctx, rollup_config, inputs):
188188
outdir = ctx.actions.declare_directory("%s_fesm_bundle_out" % ctx.label.name)
189189

190190
args = ctx.actions.args()
191191
args.add("--config", rollup_config)
192-
args.add("--output.format", format)
192+
args.add("--output.format", "esm")
193193
args.add("--output.dir", outdir.path + "/fesm2022")
194194

195195
# Note: if the input has external source maps then we need to also install and use
@@ -462,7 +462,7 @@ def _ng_package_impl(ctx):
462462

463463
rollup_config = _write_rollup_config(ctx, ctx.bin_dir.path, metadata_arg, ctx.attr.side_effect_entry_points)
464464
rollup_inputs = depset(static_files, transitive = [unscoped_all_entry_point_esm2022_depset])
465-
bundles_out = _run_rollup(ctx, rollup_config, rollup_inputs, "esm")
465+
bundles_out = _run_rollup(ctx, rollup_config, rollup_inputs)
466466

467467
packager_inputs.append(bundles_out)
468468

0 commit comments

Comments
 (0)