Fix AMD module name for external repos.
Fix AMD module name for external repos.

When naming AMD modules, we must watch out for sources compiled  from an external repository. Rather than using our local workspace name, we should use the name of the external workspace.
For example, after https://github.com/ReactiveX/rxjs/pull/3131 lands, we can depend on `@rxjs//:rxjs` and the AMD modules should be named `rxjs/Observable` for example. Without this fix, we would name it `__main__/external/rxjs/Observable`.

PiperOrigin-RevId: 177453746

bazelbuild/rules_typescript,bazelbuild/rules_typescript,bazelbuild/rules_typescript