Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jakub003's avatar

How to resolve tailwind not updating in default jestream app

I created my laravel project with laravel new projectName --jet with livewire default.

Assumed that all of the stuff should work out of the box,

Running npm run dev does refresh the pages, but doesn't seem to add styling. Like before with mix it would update the app.css file each time

// tailwind.config.js
const defaultTheme = require("tailwindcss/defaultTheme");

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: [
        "./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
        "./vendor/laravel/jetstream/**/*.blade.php",
        "./storage/framework/views/*.php",
        "./resources/views/**/*.blade.php",
    ],
// vite config
import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
            ],
            refresh: [
                ...refreshPaths,
                'app/Http/Livewire/**',
            ],
        }),
    ],
});

Is there something I am missing with starting a new project? I did npm install, setup migrations etc.

Is there a way I can just force tailwind to run again and get all the new classes?

0 likes
5 replies
Sinnbeck's avatar

It works a lot different than mix. npm run dev does not update any files. Instead it creates a node server that returns the compiled js and css. To write the actual files you need to run npm run build. So you need to run this each time you want to write the files (like on deployment)

Jakub003's avatar

@Sinnbeck I am not referring to deploying the project and running npm run build.

In my local environment, I have npm run dev running. I save a page, it refreshes in the browser. I don't see app.css updated at all, and there are no changes to the styling

Jakub003's avatar

I just fresh installed everything on my computer, and the issue has been resolved. I probably corrupted something somewhere, not sure what I did. I am chalking this up to me being a potatoe lol

Please or to participate in this conversation.