aboutsummaryrefslogtreecommitdiffstats
path: root/svelte.config.js
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-02-24 04:42:53 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-02-24 04:42:53 +0100
commit6196ec5f74faa0b783a1b3d75eadcd6cad5f651e (patch)
tree5d38c1fe5a003c2c3f333d08235bb715a9e6b0f1 /svelte.config.js
parent7340682fd77fd89d38bf17cf9b194c5d2f602088 (diff)
downloadhttptool-6196ec5f74faa0b783a1b3d75eadcd6cad5f651e.tar.gz
httptool-6196ec5f74faa0b783a1b3d75eadcd6cad5f651e.tar.bz2
httptool-6196ec5f74faa0b783a1b3d75eadcd6cad5f651e.tar.lz
httptool-6196ec5f74faa0b783a1b3d75eadcd6cad5f651e.zip

fix: split bundles, reproducible builds (hopefully)

Diffstat (limited to 'svelte.config.js')
-rw-r--r--svelte.config.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/svelte.config.js b/svelte.config.js
index bcb9810..77a4461 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -2,6 +2,7 @@ import adapter from './adapter/index.js';
import { sveltePreprocess } from 'svelte-preprocess';
import autoprefixer from 'autoprefixer';
import { transform } from 'esbuild';
+import { readFileSync } from 'node:fs';
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -43,10 +44,16 @@ const config = {
handleHttpError: 'ignore',
},
appDir: 'uwu',
- output: {
- bundleStrategy: 'single',
- },
embedded: true,
+ version: {
+ name: process.env.REPRODUCIBLE
+ ? `REPRODUCIBLE-BUILD-${readFileSync(
+ '.git/' +
+ readFileSync('.git/HEAD', 'utf-8').split('\n')[0].split(': ')[1],
+ 'utf-8'
+ ).trim()}`
+ : Date.now().toString(36),
+ },
},
};