Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove autoprefixer warning in react 17.0.2

I'm currently using React 17.0.2 (in create-react-app environment) and SCSS, and all of a sudden I'm constantly receiving the following warning from React:

Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet.

I haven't updated anything (at least to my knowledge), and the Sass Compiler that I'm using has autoprefixes disabled.

I've tried following all of the answers on this thread: How do I solve "Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet."?
And then running npm update --save to no avail.

The warning is constantly obfuscating important messages and errors, and is quite a pain to deal with, so all help is appreciated.

like image 571
GROVER. Avatar asked Jul 13 '21 05:07

GROVER.


1 Answers

Check your built react folder and confirm the CSS file to see if there're vendor prefixes? If so, try something like this:

.b { /* autoprefixer: off */ transition: 1s; }.

See autoprefixer comment

like image 93
Niyi Aromokeye Avatar answered Oct 12 '22 04:10

Niyi Aromokeye