How can I make SSR to work for my Laravel project with Vite?
export default defineConfig({
plugins: [
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
ssr: "resources/js/ssr.js",
refresh: true,
}),
But what should be the content of the ssr.js
file?
This is the content of my js
-file:
import { createApp, markRaw } from "vue";
import router from "./router";
// Route is file with the Routes:
// import {
// createRouter,
// createWebHashHistory,
// } from "vue-router";
import { createPinia } from "pinia";
import App from "./screens/App.vue";
import ResizeTextarea from "resize-textarea-vue3";
import { useAuthStore } from "@/store/auth";
const pinia = createPinia();
pinia.use(({ store }) => {
store.$router = markRaw(router);
});
const app = createApp(App);
app.use(pinia);
app.use(router);
app.use(ResizeTextarea);
app.mount("#app");
import Pusher from "pusher-js";
window.Pusher = Pusher;
Cannot find anywhere in the docs how i can fix it.
It is a VUE3 project and not inertia.