title: How to import components from local js or from a cdn
body: <p>We do have angular2 application, In which we have many components.
  We compiled this on server and we generated a JS file using outFile property.</p>
  
  <p>Now we are planning to include this JS in different applications where in the applications can import the components from generated/included JS file.</p>
  
  <p>This is working fine if we are transpiling our application(s) at browser level, But if we need to compile/transpile on server then the we see error saying respective module not found.</p>
  
  <p><strong>src\app.module.ts(24,8): error TS2307: Cannot find module 'myModuleName'</strong></p>
  
  <p>Can someone help me on this.</p>
  
  <p><strong>Current tsconfig:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var tsProject = ts.createProject({
      emitDecoratorMetaData: true,
      experimentalDecorators: true,
      target: "es5",
      module: "commonjs",
      moduleResolution: "node",
      removeComments: true,
      sourceMap: true,
      outDir: "myBuild"
  });
  
  gulp.task('scripts', function() {
      var tsResult = gulp.src('lib/*.ts')
          .pipe(embedTemplates({
              sourceType: "ts",
              basePath: "./",
              minimize: {
                  quotes: true
              }
          }))
          .pipe(tsc(tsProject));
  });</code></pre>
  </div>
  </div>
  </p>