Resolution
The issue at hand is not related to Angular, but rather pertains to transpiling specific types of TypeScript files within a browser environment.
In my particular situation, I was able to pinpoint the root cause to a solitary file that solely contained an abstract class declaration.
// This class serves as a minimal logger interface with limited visibility of actual implementation details
export abstract class MinimalLogger {
logs: string[];
logInfo: (msg: string) => void;
}
The problem arises from the fact that this file fails to export anything else besides the abstract class itself.
To resolve this issue, simply add a dummy export statement for something tangible like so:
export const _ = 0; // workaround: requires exporting a concrete entity
A similar scenario occurred with a different file that exclusively exported TypeScript interfaces, necessitating the inclusion of at least one substantial item.
Additional Context:
SystemJS Configuration Example:
System.config({
// FOR DEMO PURPOSES ONLY! AVOID TRANSPILED CODE IN BROWSER ENVIRONMENTS
transpiler: 'ts',
typescriptOptions: {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
},
meta: {
'typescript': {
"exports": "ts"
}
},
...
})