简体   繁体   中英

How to add tailwind css with quasar

大家好我正在尝试将tailwind集成到最新的类星体版本(3.5.4)中我已经使用npm install tailwindcss安装了tailwind,之后我在.postcssrc.js中添加了requier('tailwind')但它给出了错误TypeError:无法读取未定义(读取“配置”)顺风打字稿的属性

go into quasar project run npm i -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7autoprefixer@^9 then go to.postcssrc.js

module.exports = {
  plugins: [
    // to edit target browsers: use "browserslist" field in package.json
    require('autoprefixer'),
    require('tailwindcss')

  ],
}

then go to any vue component and in style tag import this

<style>
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
</style>

and you are good to go

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM