feat(bazel): prefix private-export (barred-latin-o) symbols (#23007)

This allows a bundle index to be re-exported by a higher-level module without fear of collisions.
Under bazel, we always set the prefix to be underscore-joined workspace, package, label

PR Close #23007
This commit is contained in:
Alex Eagle
2018-03-26 14:34:44 -07:00
committed by Matias Niemelä
parent 7a406a32fa
commit 27e14b2fb3
6 changed files with 24 additions and 14 deletions

View File

@ -280,6 +280,7 @@ def _write_bundle_index(ctx):
tsconfig = dict(tsc_wrapped_tsconfig(ctx, ctx.files.srcs, ctx.files.srcs), **{
"angularCompilerOptions": {
"flatModuleOutFile": flat_module_out_file,
"flatModulePrivateSymbolPrefix": "_".join([ctx.workspace_name] + ctx.label.package.split("/") + [ctx.label.name, ""]),
},
})
if not ctx.attr.module_name: