Level 102
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
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
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/**',
],
}),
],
});
Please or to participate in this conversation.