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?

More than 1 year has passed since last update.

Laravel10でtailwindcssが効かない

Posted at

状況

普段何気なくLaravelに触れていたが、今一度復習をするためにLaravel10で簡単なチャットアプリを作ろうとしていた。breezeをinstallして、デフォルトで用意してくれているtailwindでページを作成している時、一向にページが更新されないことに気づいた。例えば以下のように書いても一切ボーダーが見えない。

<div class="border-8">
    test
</div>

色の設定が必要かと思ったがそういうわけでもなかった。

結論

ものすごくしょうもない結論だが、以下のコマンドを忘れていた。

npm run dev

要するに、CSSやJSなどの重要なアセットが必要となる状況において、Viteを立ち上げてなかったという結末。php artisan serveでログイン機能まで動いているため、全然気づかなかった。フレームワークや各種ライブラリを使う時は、仕組みから理解することが重要だと気づいた。

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?