【问题标题】:@tailwindcss/jit not working when configured in postcss.config.js@tailwindcss/jit 在 postcss.config.js 中配置时不起作用
【发布时间】:2021-06-16 21:43:18
【问题描述】:

这是我的依赖项,我已经安装了@tailwindcss/jit

我听从了他们的指示

https://www.npmjs.com/package/@tailwindcss/jit

但是当我尝试替换 tailwindcss 对象时

 // postcss.config.js
  module.exports = {
    plugins: {
      tailwindcss: {},
      autoprefixer: {},
    }
  }

在 postcss.config.js 里面 进入这个 @tailwindcss/jit 对象

  // postcss.config.js
  module.exports = {
    plugins: {
      '@tailwindcss/jit': {},
      autoprefixer: {},
    }
  }

当我再次尝试使用 纱线开发

我遇到了这个错误

error - ./src/styles/tailwind.css ((webpack)/css-loader/cjs.js??ref--5-oneOf-6-1!(webpack)/postcss-loader/cjs.js??ref--5-oneOf-6-2!./src/styles/tailwind.css)
Error: ENOENT: no such file or directory, stat '/media/acatzk/Hard%20Drive/backup/React-Projects/joshuagalit.com/src/styles/tailwind.css'

当您尝试添加 jsconfig.json 时会产生影响吗? 因为我有这个代码和文件结构

请帮帮我,我需要这种文件结构

P.S:我正在使用 NEXT.JS

【问题讨论】:

    标签: next.js tailwind-css postcss


    【解决方案1】:

    这是您安装的 Tailwind JIT 版本 (0.1.3) 中的一个已知错误。由于文件路径中有空格,编译失败。

    https://github.com/tailwindlabs/tailwindcss-jit/issues/22

    已发布修复程序。您需要做的就是更新依赖项,它应该按预期构建。

    【讨论】:

    猜你喜欢
    • 2022-01-15
    • 2020-09-06
    • 2022-01-21
    • 2021-08-02
    • 2021-02-24
    • 2020-07-17
    • 2021-05-09
    • 1970-01-01
    • 2021-05-04
    相关资源
    最近更新 更多