Skip to content

Commit

Permalink
Fix support for ember-cli-babel v7 (#1212)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock authored Sep 29, 2023
1 parent fcd812a commit ff7fcfb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ module.exports = {

appOrParent.options = appOrParent.options || {};

if (checker.satisfies('^6.0.0-beta.1') || checker.satisfies('^7.0.0')) {
if (checker.satisfies('^6.0.0-beta.1')) {
appOrParent.options.babel6 = appOrParent.options.babel6 || {};
appOrParent.options.babel6.plugins = appOrParent.options.babel6.plugins || [];
appOrParent.options.babel6.plugins.push(
require.resolve('./strip-data-test-properties-plugin6')
);
} else if (checker.satisfies('^7.0.0')) {
appOrParent.options.babel = appOrParent.options.babel || {};
appOrParent.options.babel.plugins = appOrParent.options.babel.plugins || [];
appOrParent.options.babel.plugins.push(
require.resolve('./strip-data-test-properties-plugin6')
);
} else {
this.ui.writeWarnLine(
'ember-test-selectors: You are using an unsupported ember-cli-babel version. data-test ' +
Expand Down

0 comments on commit ff7fcfb

Please sign in to comment.