diff --git a/packages/bazel/src/ng_module.bzl b/packages/bazel/src/ng_module.bzl index eb158626b7..309d69c1e7 100644 --- a/packages/bazel/src/ng_module.bzl +++ b/packages/bazel/src/ng_module.bzl @@ -184,6 +184,7 @@ def _expected_outs(ctx): devmode_js_files = [] closure_js_files = [] declaration_files = [] + transpilation_infos = [] summary_files = [] metadata_files = [] @@ -233,11 +234,18 @@ def _expected_outs(ctx): continue filter_summaries = ctx.attr.filter_summaries - closure_js = [f.replace(".js", ".mjs") for f in devmode_js if not filter_summaries or not f.endswith(".ngsummary.js")] declarations = [f.replace(".js", ".d.ts") for f in devmode_js] - devmode_js_files += [ctx.actions.declare_file(basename + ext) for ext in devmode_js] - closure_js_files += [ctx.actions.declare_file(basename + ext) for ext in closure_js] + for devmode_ext in devmode_js: + devmode_js_file = ctx.actions.declare_file(basename + devmode_ext) + devmode_js_files.append(devmode_js_file) + + if not filter_summaries or not devmode_ext.endswith(".ngsummary.js"): + closure_ext = devmode_ext.replace(".js", ".mjs") + closure_js_file = ctx.actions.declare_file(basename + closure_ext) + closure_js_files.append(closure_js_file) + transpilation_infos.append(struct(closure = closure_js_file, devmode = devmode_js_file)) + declaration_files += [ctx.actions.declare_file(basename + ext) for ext in declarations] summary_files += [ctx.actions.declare_file(basename + ext) for ext in summaries] if not _is_bazel(): @@ -280,6 +288,7 @@ def _expected_outs(ctx): closure_js = closure_js_files, devmode_js = devmode_js_files, declarations = declaration_files, + transpilation_infos = transpilation_infos, summaries = summary_files, metadata = metadata_files, dts_bundles = dts_bundles,