Skip to content

Commit ab4dc2c

Browse files
committedApr 27, 2018
require imagemin on demand so default passthough can succeed without it
1 parent f0a2639 commit ab4dc2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict'
2-
var imagemin = require('imagemin')
32
var loaderUtils = require('loader-utils')
43

54
module.exports = function (content, map, meta) {
@@ -12,7 +11,7 @@ module.exports = function (content, map, meta) {
1211
}
1312

1413
var callback = this.async()
15-
imagemin
14+
require('imagemin')
1615
.buffer(content, options)
1716
.then(function (buffer) { callback(null, buffer) })
1817
.catch(function (error) { callback(error) })

0 commit comments

Comments
 (0)
Please sign in to comment.