如何使用 SystemJS+TS 显式包含 aurelia-dialog@2.0.0-rc.3 的资源?

How to explicitly include resources of aurelia-dialog@2.0.0-rc.3 with SystemJS+TS?

考虑到此处描述的更改 Aurelia Dialog breaking changes 我们正在尝试导出我们基于 JSPM 和 TypeScript 的已建立项目,以便它可以在没有此错误的情况下启动:

system.src.js:1612 Uncaught (in promise) TypeError: t.substr is not a function
    at _ (system.src.js:1612)
    at a.<anonymous> (system.src.js:2475)
    at a.normalizeSync (system.src.js:4457)
    at system.src.js:3302
    at eval (aurelia-b769ffb7bc.js:1)
    at new Promise (<anonymous>)
    at Object.ux-dialog (aurelia-b769ffb7bc.js:1)
    at eval (aurelia-b769ffb7bc.js:1)
    at Array.map (<anonymous>)
    at a._apply (aurelia-b769ffb7bc.js:1)
_ @ system.src.js:1612

这是我们当前的配置: packages.json:

"jspm": {
    "dependencies": {     
      "aurelia-dialog": "npm:aurelia-dialog@^2.0.0-rc.2",     
    }
  }

bundles.js:

"dist/aurelia": {
    "includes": [
     ...
       "aurelia-dialog",
     ...
    ],
    "options": {
        "inject": true,
        "minify": true,
        "depCache": true,
        "rev": true
    }
}

并在 config.js 中:

  "aurelia-fb495f2376.js": [  
    ...  
      "npm:aurelia-dialog@2.0.0-rc.3/aurelia-dialog.js",
     ...
      "npm:aurelia-dialog@2.0.0-rc.3/renderer.js",
     ....     
    ]

只是在 bundles.js 中添加 "aurelia-dialog/resources/*.js" 没有帮助所以我想它应该在 packages.json 中完成?

我们应该在哪里以及如何明确地包含所需的 resources 构建依赖项以便它可以正确地捆绑和导出?

括号[]是解决方案。

"dist/aurelia": {
    "includes": [
     ...
       "aurelia-dialog",
        "[aurelia-dialog/resources/*.js]",  
     ...
    ]
}