rollup/rollup-pluginutils

createFilter conflicts between include & exclude

halostatue opened this issue · 4 comments

This is probably related to #4 and the suggestion in the comments (use a stricter include filter only) should probably be a documentation update (with a recommendation to plug-in authors who use createFilter to document the same) as I found a pretty nasty behavioural case with this at rollup/rollup-plugin-babel#323.

If I specify babel({ exclude: ['node_modules/**'], include: ['node_modules/vue-password/**'] }), rollup-plugin-babel errors out hard because it uses createFilter.

This seems already covered in the documentation here:

      // if `options.include` is omitted or has zero length, filter
      // will return `true` by default. Otherwise, an ID must match
      // one or more of the minimatch patterns, and must not match
      // any of the `options.exclude` patterns.

I was specifically thinking in the README, where you pointed me to previously.

The thing I've pasted in is from README - it is inside a code block.

Ah. Missed that. Thanks.