From 15ff4c529e250e62083406740c4dcc10adc6f2d8 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 24 Apr 2017 08:46:20 +0200 Subject: [PATCH] Fix ember-cli-babel@6 compatibility --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 85cc1628..f4c309c3 100644 --- a/index.js +++ b/index.js @@ -59,13 +59,15 @@ module.exports = { let checker = new VersionChecker(this).for('ember-cli-babel', 'npm'); app.options = app.options || {}; - app.options.babel = app.options.babel || {}; - app.options.babel.plugins = app.options.babel.plugins || []; if (checker.satisfies('^5.0.0')) { + app.options.babel = app.options.babel || {}; + app.options.babel.plugins = app.options.babel.plugins || []; app.options.babel.plugins.push(require('./strip-data-test-properties-plugin')); } else if (checker.satisfies('^6.0.0-beta.1')) { - app.options.babel.plugins.push(require('./strip-data-test-properties-plugin6')); + app.options.babel6 = app.options.babel6 || {}; + app.options.babel6.plugins = app.options.babel6.plugins || []; + app.options.babel6.plugins.push(require('./strip-data-test-properties-plugin6')); } else { this.ui.writeWarnLine('ember-test-selectors: You are using an unsupported ember-cli-babel version. data-test ' + 'properties are not automatically stripped from your JS code.');