File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,6 @@ const defaults = {
27
27
module . exports = function wdm ( compiler , opts ) {
28
28
const options = Object . assign ( { } , defaults , opts ) ;
29
29
30
- if ( options . lazy ) {
31
- if ( typeof options . filename === 'string' ) {
32
- const filename = options . filename
33
- . replace ( / [ \- \[ \] \/ \{ \} \( \) \* \+ \? \. \\ \^ \$ \| ] / g, '\\$&' ) // eslint-disable-line no-useless-escape
34
- . replace ( / \\ \[ [ a - z ] + \\ \] / gi, '.+' ) ;
35
-
36
- options . filename = new RegExp ( `^[/]{0,1}${ filename } $` ) ;
37
- }
38
- }
39
-
40
30
// defining custom MIME type
41
31
if ( options . mimeTypes ) {
42
32
const typeMap = options . mimeTypes . typeMap || options . mimeTypes ;
@@ -57,6 +47,14 @@ module.exports = function wdm(compiler, opts) {
57
47
}
58
48
} ) ;
59
49
} else {
50
+ if ( typeof options . filename === 'string' ) {
51
+ const filename = options . filename
52
+ . replace ( / [ \- \[ \] \/ \{ \} \( \) \* \+ \? \. \\ \^ \$ \| ] / g, '\\$&' ) // eslint-disable-line no-useless-escape
53
+ . replace ( / \\ \[ [ a - z ] + \\ \] / gi, '.+' ) ;
54
+
55
+ options . filename = new RegExp ( `^[/]{0,1}${ filename } $` ) ;
56
+ }
57
+
60
58
context . state = true ;
61
59
}
62
60
You can’t perform that action at this time.
0 commit comments