Remove unwanted import
declarations when building packages with babel transforms.
$ npm install -D babel-plugin-remove-imports
This plugin currently working only via the Node API
var RemoveImports = require("babel-plugin-remove-imports");
var regexp = new RegExp(/\S+(\.scss$)/g);
require("babel-core").transform("code", {
plugins: [RemoveImports(regexp)]
});
When regexp
can be an Array of RegExp