-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathssr.config.ts
More file actions
30 lines (29 loc) · 895 Bytes
/
ssr.config.ts
File metadata and controls
30 lines (29 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import laravel from "laravel-vite-plugin";
import { sveltePreprocess } from "svelte-preprocess";
export default defineConfig({
plugins: [
laravel({
input: ["resources/js/app.ts", "resources/css/app.css"],
ssr: "resources/js/ssr.ts", // Enable SSR
publicDirectory: "public",
buildDirectory: "bootstrap",
refresh: true,
}),
svelte({preprocess: sveltePreprocess({typescript: true})}),
],
build: {
ssr: true, // Enable SSR
outDir: "bootstrap",
rollupOptions: {
input: "resources/js/ssr.ts",
output: {
entryFileNames: "assets/[name].js",
chunkFileNames: "assets/[name].js",
assetFileNames: "assets/[name][extname]",
manualChunks: undefined, // Disable automatic chunk splitting
},
},
},
});