File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ module.exports = {
53
53
{
54
54
test : / \. ( p n g | j p e ? g | g i f | s v g | e o t | t t f | w o f f | w o f f 2 ) ( \? .* ) ? $ / ,
55
55
loader : 'url-loader' ,
56
- options : { limit : 8000 }
56
+ options : { limit : 1024 }
57
57
}
58
58
]
59
59
} ,
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ module.exports = function loader(contentBuffer) {
18
18
}
19
19
20
20
/** @see https://github.com/zouhir/lqip-loader */
21
- const contentIsUrlExport = / ^ e x p o r t d e f a u l t " d a t a : ( .* ) b a s e 6 4 , ( .* ) / . test (
21
+ const contentIsUrlExport = / ^ ( e x p o r t d e f a u l t | m o d u l e . e x p o r t s = ) " d a t a : ( .* ) b a s e 6 4 , ( .* ) / . test (
22
22
content
23
23
)
24
- const contentIsFileExport = / ^ e x p o r t d e f a u l t ( .* ) / . test ( content )
24
+ const contentIsFileExport = / ^ ( e x p o r t d e f a u l t | m o d u l e . e x p o r t s = ) ( .* ) / . test ( content )
25
25
let source = ''
26
26
27
27
if ( contentIsUrlExport ) {
@@ -32,7 +32,7 @@ module.exports = function loader(contentBuffer) {
32
32
const fileLoader = require ( 'file-loader' )
33
33
content = fileLoader . call ( this , contentBuffer )
34
34
}
35
- source = content . match ( / ^ e x p o r t d e f a u l t ( .* ) ; / ) [ 1 ]
35
+ source = content . match ( / ^ (?: e x p o r t d e f a u l t | m o d u l e . e x p o r t s = ) ( .* ) ; / ) [ 1 ]
36
36
}
37
37
38
38
function createModule ( { data, info, type } ) {
@@ -42,7 +42,7 @@ module.exports = function loader(contentBuffer) {
42
42
}
43
43
callback (
44
44
null ,
45
- `export default {src:${ source } ,` + JSON . stringify ( result ) . slice ( 1 )
45
+ `module.exports = {src:${ source } ,` + JSON . stringify ( result ) . slice ( 1 )
46
46
)
47
47
}
48
48
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function urlToRequire(url) {
29
29
const secondChar = url . charAt ( 1 )
30
30
url = url . slice ( secondChar === '/' ? 2 : 1 )
31
31
}
32
- return `require("${ url } ?vuetify-preload").default `
32
+ return `require("${ url } ?vuetify-preload")`
33
33
} else {
34
34
return `"${ url } "`
35
35
}
You can’t perform that action at this time.
0 commit comments