check if import/required babel-polyfill are removed

This commit is contained in:
Henry Zhu 2017-04-07 17:47:43 -04:00
parent 79573baa16
commit 5248f499b3
4 changed files with 13 additions and 3 deletions

View File

@ -20,8 +20,6 @@ function getObjectString(node) {
return node.name;
} else if (node.type === "MemberExpression") {
return `${getObjectString(node.object)}.${getObjectString(node.property)}`;
} else {
return "";
}
}
@ -94,7 +92,7 @@ When setting "useBuiltIns: true", polyfills are automatically imported when need
Please remove the "require('babel-polyfill')" call or use "useBuiltIns: 'entry'" instead.
`,
);
path.remove();
bodyPath.remove();
}
});
},

View File

@ -0,0 +1,4 @@
import "babel-polyfill";
import "babel-polyfill";
require("babel-polyfill");
require("babel-polyfill");

View File

@ -0,0 +1,8 @@
{
"presets": [
["../../../../lib", {
"useBuiltIns": true,
"modules": false
}]
]
}