Seb
Seb

Reputation: 1118

How to include aurelia-dialog into bundle with Aurelia?

I use aurelia-dialog in my web application and everything works fine.
But when I export (glup export) this application, I have this error when loading:

Error: XHR error (404 Not Found) loading http://localhost/myApp/jspm_packages/npm/[email protected]/resources/ai-dialog.html Error loading http://localhost/myApp/jspm_packages/npm/[email protected]/resources/ai-dialog.html!http://localhost/myApp/jspm_packages/github/systemjs/[email protected] Error loading http://localhost/myApp/jspm_packages/npm/[email protected]/resources/ai-dialog.html!template-registry-entry

My bundles.js content :

....
"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?

Upvotes: 2

Views: 501

Answers (1)

Miroslav Popovic
Miroslav Popovic

Reputation: 12128

Just include its .html (and .css) files too.

....
"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"
  ]
  .....

Upvotes: 4

Related Questions