0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. の解消 🤩

Posted at

はじめに

React.jsTailwind CSS をインストールした時に遭遇したエラーの解消方法を載せておきます。

it looks like you're trying to use `tailwindcss` directly as a postcss plugin.

🪄 解消法

エラー内容で検索した際にヒットした本記事公式ドキュメントを試しましたが、イマイチ解消には至らずでした。

解消方法としては、以下対応でエラー解消することができましたので載せておきます😆

  • 3.4.15バージョン指定でインストール
  • tailwind.config.jsにて以下記述
npm i -D @vitejs/plugin-react postcss tailwindcss@@^3.4.15
tailwind.config.js
import react from '@vitejs/plugin-react';
export default {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  plugins: [react()],
};

💫 参考文献

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?