我正在测试用于 jpg minify 的插件 grunt-contrib-imagemin。但它总是失败,因为正在运行“imagemin:dynamic”(imagemin)任务致命错误:此套接字已关闭。
Source :
grunt.initConfig({
imagemin: { // Task
dynamic: { // Another target
files: [{
expand: true, // Enable dynamic expansion
cwd: 'src/', // Src matches are relative to this path
src: ['**/*.{png,jpg,gif}'], // Actual patterns to match
dest: 'dist/' // Destination path prefix
}]
}
}
});