title: "Error: In this configuration Angular requires Zone.js" when trying to set up a platform-server
body: <p>Still trying to set up a platform server and render my module with a custom renderer (which I don't have implemented yet).</p>
  <h1>Issues</h1>
  <ul>
  <li>I am getting an error that I don't know how to fix (<code>zone.js</code> is in my npm dependencies).
  <blockquote>
  <p>Error: In this configuration Angular requires Zone.js</p>
  </blockquote>
  </li>
  <li>I am not even sure that I am going the right way towards custom module rendering...</li>
  </ul>
  <h1>Main Code</h1>
  <pre><code>export function createCompiler(compilerFactory: CompilerFactory) {
    return compilerFactory.createCompiler();
  }
  
  async function generate&lt;M&gt;(moduleType: Type&lt;M&gt;) {
    try {
      const extraProviders: StaticProvider[] = [
        { provide: Compiler, useFactory: createCompiler, deps: [CompilerFactory] },
      ];
      const platformRef = platformDynamicServer(extraProviders);
      const moduleRef = await platformRef
        .bootstrapModule(
          moduleType,
          {
            providers: [ { provide: ResourceLoader, useValue: new ResourceLoaderImpl(`src\\app`), deps: [ ] }, ],
          });
      
      const appComponent = moduleRef.injector.get(AppComponent);
      
      console.info(appComponent.title.toString());
    } catch (error) {
      throw new Error(error.toString());
    }
  }
  
  generate(AppModule)
    .then(message =&gt; console.info({ message }))
    .catch(error =&gt; console.error({ error }));
  </code></pre>
  <h1>Custom Resource Loader</h1>
  <pre><code>@Injectable()
  export class ResourceLoaderImpl extends ResourceLoader {
    constructor(private _cwd: string) {
      super();
    }
  
    get(resourceFileName: string): Promise&lt;string&gt; {
      return new Promise&lt;string&gt;((resolve, reject) =&gt; {
        glob(`**/${resourceFileName}`, { cwd: this._cwd, }, (globError, matches) =&gt; {
          if (globError) reject(globError);
          else
            readFile(
              path.join(this._cwd, matches[0]),
              (readFileError, data) =&gt; {
                if (readFileError) reject(readFileError);
                else resolve(data.toString());
              }
            );
        });
      });
    }
  }
  </code></pre>
  <h1>Imports</h1>
  <pre><code>import { ResourceLoader } from '@angular/compiler';
  import { Compiler, CompilerFactory, Injectable, StaticProvider, Type } from '@angular/core';
  import { platformDynamicServer } from '@angular/platform-server';
  import { readFile } from 'fs';
  import * as glob from 'glob';
  import * as path from 'path';
  import { AppComponent } from './app/app.component';
  import { AppModule } from './app/app.module';
  </code></pre>