3
votes

I have an addon, my-addon-parent, that depends on a nested addon, my-addon-nested, that specified via the the dependencies property in my-addon-parent's package.json.

When I run the dummy app for my-addon-parent, the nested addon's CSS is imported correctly (I use the included hook to specify the import) and added to the vendor.css file.

However, when including my-addon-parent in an Ember app, the nested addons CSS is not added to the vendor.css file. Is there a hook/setting that I am missing? Below are the package.json for the app and the respective index.js files for the parent and nested addons.

Ember App package.json

{
  "name": "my-app",
  "version": "0.0.0",
  "description": "My App.",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.0.0",
    "connect-restreamer": "^1.0.1",
    "ember-cli": "0.2.0",
    "ember-cli-app-version": "0.3.2",
    "ember-cli-babel": "^4.0.0",
    "ember-cli-content-security-policy": "0.3.0",
    "ember-cli-dependency-checker": "0.0.8",
    "ember-cli-htmlbars": "0.7.4",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.3.0",
    "ember-cli-qunit": "0.3.9",
    "ember-cli-uglify": "1.0.1",
    "ember-data": "1.0.0-beta.15",
    "ember-export-application-global": "^1.0.2",
    "express": "^4.12.3",
    "glob": "^4.5.3",
    "morgan": "^1.5.2",
    "my-addon-parent": "some/location"
  }
}

my-addon-parent index.js

/* jshint node: true */
'use strict';

module.exports = {
  name: 'my-addon-parent',

  included: function (app) {
    this._super.included(app);

    app.import('vendor/my-addon-parent/my-addon-parent.css');
  }
};

my-addon-nested index.js

/* jshint node: true */
'use strict';

module.exports = {
  name: 'my-addon-nested',

  included: function (app) {
    this._super.included(app);

    app.import('vendor/my-addon-nested/my-addon-nested.css');
  }
};
1

1 Answers

1
votes

This is currently not possible. Details here.