forked from spacesprotocol/explorer
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsvelte.config.js
More file actions
41 lines (34 loc) · 920 Bytes
/
Copy pathsvelte.config.js
File metadata and controls
41 lines (34 loc) · 920 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
31
32
33
34
35
36
37
38
39
40
41
// svelte.config.js
import adapter from '@sveltejs/adapter-node'; // or your preferred adapter
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
// Production optimization settings
precompress: true, // Enable Brotli & Gzip precompression
polyfill: false, // Disable Node polyfills if not needed
out: 'build' // Output directory
}),
// Asset optimization
inlineStyleThreshold: 8192, // Inline small styles
// CSP settings if needed
csp: {
mode: 'hash',
directives: {
'script-src': ['self']
}
},
// Additional optimizations
prerender: {
handleMissingId: 'ignore' // More aggressive prerendering
},
// Environment configuration
env: {
dir: '.'
}
},
// Enable preprocessing
preprocess: [vitePreprocess()]
};
export default config;