babel-plugin-filter-imports icon indicating copy to clipboard operation
babel-plugin-filter-imports copied to clipboard

Match imports with paths?

Open slavafomin opened this issue 6 years ago • 0 comments

Hello!

Thank you for this useful plugin.

However, consider that I have the following imports in my source code:

import "third-party/foo";
import "third-party/bar";
import "third-party/baz/qux/quux";

How do I delete all such imports?

I've tried the following, but it didn't work:

[
  'filter-imports', {
    imports: {
      'third-party': true,
      'third-party/*': true,
      'third-party/**': true,
      'third-party/**/*': true,
    },
  },
],

slavafomin avatar Nov 25 '19 20:11 slavafomin