我克隆了这个仓库。 https://github.com/tailwindcss/setup-examples/tree/master/examples/nextjs
然后我更新了tailwind.config.js
theme: {
extend: {
color: {
primary: "#730000",
secondry: "#efefef",
},
},
},
variants: {},
plugins: [],
};
然后运行命令
postcss css/tailwind.css -o generated.css
终端抛出一个错误TypeError: Invalid PostCSS Plugin found at: plugins[0]
谁能帮我解决这个问题。谢谢。
最佳答案
改变了这个
module.exports = {
plugins: [
"postcss-import",
"tailwindcss",
"autoprefixer",
]
};
至
module.exports = {
plugins: [
require("postcss-import"),
require("tailwindcss"),
require("autoprefixer"),
]
};
解决了
TypeError: Invalid PostCSS Plugin found at: plugins[0]
关于next.js - TypeError : Invalid PostCSS Plugin found at: plugins[0],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61104498/