2

我在我的网络应用程序中使用 aurelia-dialog 并且一切正常。
但是当我导出(glup export)这个应用程序时,加载时出现这个错误:

错误:XHR 错误(404 未找到)加载http://localhost/myApp/jspm_packages/npm/aurelia-dialog@0.5.10/resources/ai-dialog.html 加载http://localhost/myApp/jspm_packages/npm 时出错/aurelia-dialog@0.5.10/resources/ai-dialog.html!http://localhost/myApp/jspm_packages/github/systemjs/plugin-text@0.0.3.js 加载时出错http://localhost/myApp/ jspm_packages/npm/aurelia-dialog@0.5.10/resources/ai-dialog.html!template-registry-entry

我的 bundles.js 内容:

....
"dist/aurelia": {
  "includes": [
    "aurelia-framework",
    "aurelia-bootstrapper",
    "aurelia-fetch-client",
    "aurelia-router",
    "aurelia-animator-css",
    "aurelia-templating-binding",
    "aurelia-polyfills",
    "aurelia-templating-resources",
    "aurelia-templating-router",
    "aurelia-loader-default",
    "aurelia-history-browser",
    "aurelia-logging-console",
    "aurelia-event-aggregator",
    "bootstrap",
    "bootstrap/css/bootstrap.css!text",
    "aurelia-dialog",
    "aurelia-i18n",
    "text",
    "i18next-xhr-backend",
    "fetch"
  ]
  .....

有任何想法吗?

4

1 回答 1

4

也只需包含它的.html(和.css)文件。

....
"dist/aurelia": {
  "includes": [
    "aurelia-framework",
    "aurelia-bootstrapper",
    "aurelia-fetch-client",
    "aurelia-router",
    "aurelia-animator-css",
    "aurelia-templating-binding",
    "aurelia-polyfills",
    "aurelia-templating-resources",
    "aurelia-templating-router",
    "aurelia-loader-default",
    "aurelia-history-browser",
    "aurelia-logging-console",
    "aurelia-event-aggregator",
    "bootstrap",
    "bootstrap/css/bootstrap.css!text",
    "aurelia-dialog",
    "aurelia-dialog/resources/ai-dialog*.html!text", // <- like this
    "aurelia-dialog/dialog.css!text", // <- CSS file
    "aurelia-i18n",
    "text",
    "i18next-xhr-backend",
    "fetch"
  ]
  .....
于 2016-05-20T12:53:21.643 回答