System.js builder.buildStatic只是输出文件名

我刚刚简化了源文件到下面,当我在脚本标记中使用System.import时,它工作正常。

import angular from "angular"; angular.element(document).ready(function () { alert('Hello word');; }); 

以下是我的config.js

 System.config({ baseURL: "/", defaultJSExtensions: true, transpiler: "typescript", paths: { "npm:": "jspm_packages/npm/" }, map: { "angular": "npm:angular@1.5.2", "typescript": "npm:typescript@1.8.9" } }); 

我有一个吞咽任务来build立它:

 gulp.task('bundle:js', ['clean:js'], function () { var builder = new Builder(); builder.loadConfig('./config.js').then(function () { var destination = paths.coreJsDest; builder.buildStatic(paths.srcRoot + 'js/ng/homepage', destination, { minify: false, sourceMaps: false, runtime: false }); }); }); 

但是输出文件包含文件名,而不是文件及其导入的JavaScript:

 (["1"], ["1"], function($__System) { }) (function(factory) { if (typeof define == 'function' && define.amd) define(["D:/Projects/etc-etc/assets/js/ng/homepage.js"], factory); else if (typeof module == 'object' && module.exports && typeof require == 'function') module.exports = factory(require("D:/Projects/etc-etc/js/ng/homepage.js")); else throw new Error("Module must be loaded as AMD or CommonJS"); }); 

       

网上收集的解决方案 "System.js builder.buildStatic只是输出文件名"