我在网络应用程序中使用了aurelia-dialog,一切正常 但是当我导出(glup export)这个应用程序时,加载时出现此错误:
错误:XHR错误(404 Not Found)loading 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"
]
.....
有什么想法吗?
答案 0 :(得分: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"
]
.....