【问题标题】:I added tailwindcss 3 to the vue-sfc-rollup project but it doesn't work我在 vue-sfc-rollup 项目中添加了 tailwindcss 3 但它不起作用
【发布时间】:2022-01-22 14:41:27
【问题描述】:

我在 vue-sfc-rollup 项目中添加了 tailwindcss 3 但它不起作用

ERROR  Failed to compile with 1 error   
error  in ./dev/index.css

Syntax Error: Error: PostCSS plugin tailwindcss requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users

【问题讨论】:

    标签: vuejs3 tailwind-css


    【解决方案1】:

    试试:

    npm uninstall tailwindcss postcss autoprefixer
    npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
    

    一旦您的其他工具添加了对 PostCSS 8 的支持,您就可以 通过重新安装 Tailwind 及其 使用最新标签的对等依赖项:

    npm uninstall tailwindcss
    npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
    

    欲了解更多信息,请参阅here

    【讨论】:

      猜你喜欢
      • 2021-08-07
      • 1970-01-01
      • 2019-04-25
      • 2022-01-21
      • 2018-11-23
      • 2017-01-15
      • 2022-08-23
      • 1970-01-01
      • 2020-06-15
      相关资源
      最近更新 更多