score:3

Accepted answer

you can include it as bower dependency with bower install command.

after including it to the project,in ember-cli-build.js file, use app.import to add it to build as following (please check the path):

app.import('bower_components\chartjs-plugin-annotation\chartjs-plugin-annotation.min.js');

if you don't want to use bower and if you prefer npm, then have a look at broccoli family. it is a bit long way.

score:0

add npm package ember install ember-auto-import

ember-cli-build.js

/* eslint-env node */
'use strict';

const emberapp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
  let app = new emberapp(defaults, {
    autoimport: {
      alias: {
        'chartjs-plugin-datalabels': 'chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.js',
      },
    }
  });
  return app.totree();
};

import in component-name.js

import 'chartjs-plugin-datalabels'

Related Query

More Query from same tag