source.exclude

  • Type: Array<string | RegExp>
  • Default: []

Specifies JavaScript/TypeScript files that do not need to be compiled. The usage is consistent with Rule.exclude in webpack, which supports passing in strings or regular expressions to match the module path.

For example:

import path from 'path';

export default {
  source: {
    exclude: [path.resolve(__dirname, 'src/module-a'), /src\/module-b/],
  },
};