在遵循official guide for TailwindCSS with PostCSS时,我发现自己出现了以下错误:
@parcel/transformer-postcss: Could not resolve module "tailwindcss/nesting" from "C:\Users\Daniel\source\repos\AFP_Reservas\.postcssrc"我的.postcssrc文件如下所示:
{
"modules": false,
"plugins": {
"postcss-import": {},
"tailwindcss/nesting": {},
"tailwindcss": {}
"autoprefixer": {
"grid": true
}
}
}tailwind.config.js看起来像这样:
module.exports = {
future: {
// removeDeprecatedGapUtilities: true,
// purgeLayersByDefault: true,
},
purge: [
'./Maquetas/home.html'
],
theme: {
extend: {},
},
variants: {},
plugins: [],
}并且我安装了以下依赖项:
"devDependencies": {
"@parcel/transformer-sass": "^2.0.0",
"autoprefixer": "^10.4.0",
"parcel": "^2.0.0",
"postcss": "^8.3.11",
"postcss-import": "^14.0.2",
"postcss-nested": "^5.0.6",
"tailwindcss": "^1.9.6"
}我是不是遗漏了什么?我尝试过安装@ tailwindcss / nesting,但嵌套模块应该是核心tailwindcss模块的一部分。
发布于 2021-11-02 18:36:43
因为我使用的是Tailwind版本1.9 (由于客户的需要,为了支持Internet Explorer ),所以我不能使用Tailwind can/nesting,根据1.9 documentation,你必须使用postcss-nested。
https://stackoverflow.com/questions/69798560
复制相似问题