I am trying to find the right answers.
I found out that it is possible to define multiple rootViews using [email protected]:
public function rootView(Request $request)
{
if ($request->routeIs('admin.*')) {
return 'admin';
}
return 'app';
}
This way I can import two different css files and ..., but honestly I don't feel that creating two apps is the right answer, I feel there must be some way like a higher order component or something else.
And what about vite.config.js then
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.js',
ssr: 'resources/js/ssr.js',
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
ssr: {
noExternal: ['@inertiajs/server'],
},
server: {
host: "localhost",
},
});
I was just sharing my toughts. Thanks