feat(ngc): allow ngc implementations to provide XHR (#10708)
This commit is contained in:
parent
50c795280f
commit
6e842fc5bf
|
@ -118,8 +118,8 @@ export class CodeGenerator {
|
||||||
|
|
||||||
static create(
|
static create(
|
||||||
options: AngularCompilerOptions, program: ts.Program, compilerHost: ts.CompilerHost,
|
options: AngularCompilerOptions, program: ts.Program, compilerHost: ts.CompilerHost,
|
||||||
reflectorHostContext?: ReflectorHostContext): CodeGenerator {
|
reflectorHostContext?: ReflectorHostContext, xhr?: compiler.XHR): CodeGenerator {
|
||||||
const xhr: compiler.XHR = {
|
xhr = xhr || {
|
||||||
get: (s: string) => {
|
get: (s: string) => {
|
||||||
if (!compilerHost.fileExists(s)) {
|
if (!compilerHost.fileExists(s)) {
|
||||||
// TODO: We should really have a test for error cases like this!
|
// TODO: We should really have a test for error cases like this!
|
||||||
|
|
Loading…
Reference in New Issue