[Chartjs]-How to use an Aurelia JSPM plugin with WebPack

3๐Ÿ‘

โœ…

Try this:

// (package.json)
"aurelia": {
  "build": {
    "resources": [
      "aurelia-chart/elements/chart-element",
      "aurelia-chart/attributes/chart-attribute"
    ]
  }
},

0๐Ÿ‘

for latest aurelia-cli (0.32.0) + webpack use chart.js 2.5.0 and use global resources in main.js

aurelia.use.plugin(PLATFORM.moduleName('aurelia-chart'));
aurelia.use.globalResources(PLATFORM.moduleName('aurelia-chart/elements/chart-element'));
aurelia.use.globalResources(PLATFORM.moduleName('aurelia-chart/attributes/chart-attribute'));

Leave a comment