29
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

imagemin-pngquant@7.0.0からoptionの書き方が変わってるから注意

Last updated at Posted at 2019-02-22

imagemin-pngquantv7.0.0からoptionの書き方が変わったので注意です。
v7.0.0にアプデした上でv6.0.1までの書き方をすると ArgumentError: Expected argument to be of type 'array' but received type 'string' というエラーが出ます。

imagemin-pngquant@6.0.1までの書き方
pngquant({
    quality: '70-85',
  })
imagemin-pngquant@7.0.0以降の書き方
pngquant({
    quality: [.7, .85],
  })

上記のように配列にした上で、最小値0から最大値1の範囲を小数点を使って表しましょう。

29
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?