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

freemium's avatar

use customer.css file from public/front/custom.css in vite

how can I use the custom.css and custom.js files from the public directory in vite config file?

my default site config file is

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/**',
            ],
        }),
    ],
});

0 likes
1 reply
Sinnbeck's avatar

Why do you need it in vite when it's already in public, so you can just add it to the page in a link tag

Please or to participate in this conversation.