What do you mean by you're using bootstarp on the back-end?
Just use different file for each side
In Laravel Mix
mix.css('resources/your_backend_file.css', '.css')
.css('resources/your_front_end.css', 'css')
// ... etc
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
How to build frontend and backend separate jss css bundle using vite in laravel application? In frontend I'm using tailwind css and tailwind elements and I'm using bootstrap 5 and admin lte for admin panel - backend. I hope someone already done this. what configuration in vite configuration will give such build output.
Thanks in advance.
@bhojkamal In your vite config add your files in Laravel plugin
plugins: [
laravel([
'resources/js/front.js',
'resources/js/back.js',
]),
// ...
The use vite directive for to add your files for each page
Back-end
@vite( 'resources/js/back.js')
Front-end
@vite( 'resources/js/front.js')
Please or to participate in this conversation.