aboutsummaryrefslogtreecommitdiff
path: root/vite.config.ts
blob: 581285da3e965ece3277a12a2109ea98452d1431 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*** IMPORT ------------------------------------------- ***/

import adapter from "@sveltejs/adapter-node";

import { defineConfig } from "vite";
import { sveltekit } from "@sveltejs/kit/vite";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";

/*** EXPORT ------------------------------------------- ***/

export default defineConfig({
	plugins: [
		sveltekit({
			adapter: adapter(),
			compilerOptions: {
				/*** Force runes mode for the project, except for libraries. Can be removed in Svelte 6. ***/
				runes: ({ filename }) => filename.split(/[/\\]/).includes("node_modules") ? undefined : true
			},
			preprocess: [vitePreprocess()]
		})
	],
	server: {
	  allowedHosts: ["scilab.local"]
	}
});



// //// import

// import { sveltekit } from "@sveltejs/kit/vite";
// import type { UserConfig } from "vite";



// //// export

// export default {
//   json: {
//     namedExports: true
//   },
//   plugins: [sveltekit()],
//   server: {
//     fs: {
//       allow: [
//         "package.json",
//         "sass"
//       ]
//     }
//   }
// } satisfies UserConfig;