5
0

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.

Nuxt.jsでCSSがminifyされてないので、気持ちよくminifyする

Last updated at Posted at 2018-11-06

nuxt.config.jsのbuildのところに下記のように追加してあげるだけで
私の気持ち良いと思う感じにしてくれる。

build: {
    postcss: [
      require('postcss-custom-properties')({
        warnings: false
      }),
      require('cssnano')({
        preset: 'default'
      })
    ],
...

Before

image.png

After

image.png

コードまで見るのが好きな私だけの趣味的なものかもしれないのですが、こっちの方が気持ちいいので。
デフォルトでMinifyこれでもいいのにな〜って思うぐらいです。

以上、自分記録用。

5
0
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
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?