ember.jsember-cliember-cli-addons

Order of ember-cli preprocessors


I'm the maintainer of the ember-cli preprocessor for java.properties files to generate a JS file exporting a JSON object with values. The problem I'm running into is that the file is correctly processed (ES2015 flavored), but that files is not transpiled into ES5.

The generated app.js file contains this statement: export default {"foo":"bar"} but that should be transpiled into something like this:

define('my-app/locales/en', ['exports'], function (exports) {
  exports['default'] = {"foo":"bar"};
});

Is it possible to generate the ES2015 flavored file and after that run the default transpiler to create the ES5 variant?


Solution

  • I had to define this addon to run before ember-cli-babel in package.json.

    {
      ...
      "ember-addon": {
        "main": "index.js",
        "before": "ember-cli-babel"
      },
    }