Does Webpack 1 support "include" and "exclude" in bootloaders?

Does Webpack 1. * support inclusion and exclusion options in the bootloader? I can not find the documentation talking about it, and also does not have any examples in it containing it.

{
  // ....
  module: {
    loaders: [
      {
         test: '\.js',
         include: [/node_modules/],
         exclude: [/extra_srcs/]
      }
    ]
  }
}
+6
source share
1 answer

Yes . As noted in these documents, it is includepreferable than excludewhen possible. These documents also suggest what excludeshould be the condition, so the array may not work there. Using your example:

{
  // ....
  module: {
    loaders: [
      {
        test: /\.js$/,
        include: [/node_modules/],
        exclude: /extra_srcs/
      }
    ]
  }
}
+3
source

All Articles