1
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?

Next.jsプロジェクトでTailwind CSSを削除する方法

Posted at

アジェンダ

Next.jsの環境構築の際に、意図せずTailwindを追加してしまったりすることがあり、削除したくなることがあります。
その際に、どのように削除すればよいか手順をまとめます。

手順

1. Tailwind CSSの依存関係をアンインストール

まず、Tailwind CSSに関連する依存関係をアンインストールします。以下のコマンドをターミナルで実行してください。

npm uninstall tailwindcss postcss autoprefixer

2. Tailwind CSSの設定ファイルを削除

次に、プロジェクトのルートディレクトリにあるtailwind.config.jsおよびpostcss.config.jsファイルを削除します。これらのファイルはTailwind CSSの設定ファイルです。

3. Tailwind CSSのインポートを削除

styles/globals.cssなどのファイルにあるTailwind CSSのインポート行を削除します。これにより、プロジェクトからTailwind CSSのスタイルが除去されます。

/* 例えば、以下の行を削除 */
@tailwind base;
@tailwind components;
@tailwind utilities;
1
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
1
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?