Does Webpack 1.* support the include and exclude options within a loader? I can not find documentation saying it does, nor does the Webpack-1 github branch have any examples containing it.
{ // .... module: { loaders: [ { test: '\.js', include: [/node_modules/], exclude: [/extra_srcs/] } ] } } 1 Answers
Answers 1
Yes. As noted in those docs, include is preferable over exclude, when possible. Those docs also suggest that exclude should be a condition, so an array may not work there. Using your example:
{ // .... module: { loaders: [ { test: /\.js$/, include: [/node_modules/], exclude: /extra_srcs/ } ] } }
0 comments:
Post a Comment