morlay / babel-plugin-transform-require-ignore

65 stars 13 forks source link

Adds option to exlude files by pattern #10

Closed hnrchrdl closed 3 years ago

hnrchrdl commented 3 years ago

I needed to exclude some files, because I have a project that mixes scss imports with and without cssmodules.

so I came up with these changes, so I can do something like this:

[
    'transform-require-ignore',
    {
        extensions: ['.scss', '.css'],
        exclude: [/.\.module\.scss$/],
    },
],
hnrchrdl commented 3 years ago

duplicate. opened another PR from a different branch.