postcss autoprefixer doesn't work in Next.js

382 views Asked by At

I'm using Next.js 13.

And I found that postcss and autoprefixer are built-in to the project in Next.js.

So I added browserlist to package.json, but it's not working(not prefixed).

package.json

{
  ...,
  "browserslist": [
    "last 3 version",
    "> 1%",
    "not dead"
  ]
}

Now I'm using the styles as modules by importing the .module.scss files.

How do I use autoprefixer in Next.js?

1

There are 1 answers

0
Владимир Белогородский On

I add "covers 99.5%". It works for me. It works when I run "next dev" and "next build".

package.json

"browserslist": [
  "cover 99.5%"
]