[英]How can i use Tailwind using Sass on Vue
I wanna using tailwind with sass on vue js, I'm following tailwind docs but still got this error我想在 vue js 上使用带有 sass 的顺风,我正在关注顺风文档,但仍然出现此错误
this is my depedency , postcss is up to date这是我的依赖, postcss是最新的
"dependencies": {
"autoprefixer": "^10.1.0",
"core-js": "^3.6.5",
"postcss": "^8.2.1",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^14.0.0",
"postcss-loader": "^4.1.0",
"postcss-preset-env": "^6.7.0",
"precss": "^4.0.0",
"tailwindcss": "^2.0.2",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
this is my postcss.config.js这是我的postcss.config.js
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
]
}
any solution?有什么解决办法吗? how can i use tailwind with sass preprocessor on vue js?
我如何在 vue js 上使用带有 sass 预处理器的顺风? Thanks all.
谢谢大家。
Error: PostCSS plugin tailwindcss requires PostCSS 8
错误:PostCSS 插件 tailwindcss 需要 PostCSS 8
Try to uninstall that dependencies which are related to postcss and tailwind:尝试卸载与 postcss 和 tailwind 相关的依赖项:
npm uninstall tailwindcss postcss autoprefixer
then install them using the following command:然后使用以下命令安装它们:
npm i -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
according to this section根据本节
As of v2.0, Tailwind CSS depends on PostCSS 8. Because PostCSS 8 is only a few months old, many other tools in the ecosystem haven't updated yet
从 v2.0 开始,Tailwind CSS 依赖于 PostCSS 8。由于 PostCSS 8 才几个月大,生态系统中的许多其他工具还没有更新
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.