[英]How to include aurelia-dialog into bundle with Aurelia?
I use aurelia-dialog in my web application and everything works fine. 我在Web应用程序中使用aurelia-dialog,一切正常。
But when I export (glup export) this application, I have this error when loading: 但是当我导出(glup导出)此应用程序时,加载时出现此错误:
Error: XHR error (404 Not Found) loading http://localhost/myApp/jspm_packages/npm/aurelia-dialog@0.5.10/resources/ai-dialog.html Error loading 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 Error loading http://localhost/myApp/jspm_packages/npm/aurelia-dialog@0.5.10/resources/ai-dialog.html!template-registry-entry 错误:加载http://localhost/myApp/jspm_packages/npm/aurelia-dialog@0.5.10/resources/ai-dialog.html XHR错误(未找到404)加载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
My bundles.js content : 我的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"
]
.....
Any ideas? 有任何想法吗?
Just include its .html
(and .css
) files too. 也只需包括其.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"
]
.....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.