Skip to content

Commit fc743b7

Browse files
simon04skipjack
authored andcommitted
docs(module): add function option for noParse
1 parent 2443588 commit fc743b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/configuration/module.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ These options determine how the [different types of modules](/concepts/modules)
1515

1616
`RegExp | [RegExp]`
1717

18+
`RegExp | [RegExp] | function` (since webpack 3.0.0)
19+
1820
Prevent webpack from parsing any files matching the given regular expression(s). Ignored files **should not** have calls to `import`, `require`, `define` or any other importing mechanism. This can boost build performance when ignoring large libraries.
1921

2022
```js
2123
noParse: /jquery|lodash/
24+
25+
// since webpack 3.0.0
26+
noParse: function(content) {
27+
return /jquery|lodash/.test(content);
28+
}
2229
```
2330

2431

0 commit comments

Comments
 (0)