gpt4 book ai didi

javascript - 如何解决 "Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet."?

转载 作者:行者123 更新时间:2023-12-01 15:43:46 24 4
gpt4 key购买 nike

在我的 Next.JS 应用程序中,我将样式表导入 _app.js像这样:

import '../public/css/Index.css';
Index.css包含这个:
.index-container {
margin: 20px auto 0;
}
如何解决错误消息:

./src/public/css/Index.css(./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-5-1!./node_modules/next/dist/compiled/postcss-loader??__nextjs_postcss!./src/public/css/Index.css)Warning

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

最佳答案

您的问题可以解决package.json通过应用以下代码:

 "browserslist": {
"production": [
">0.3%",
"not ie 11",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
">0.3%",
"not ie 11",
"not dead",
"not op_mini all"
]
}
进行这些更改后,重新启动服务器。您将不再收到此警告。

关于javascript - 如何解决 "Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet."?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62883240/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com