From 6196ec5f74faa0b783a1b3d75eadcd6cad5f651e Mon Sep 17 00:00:00 2001 From: memdmp Date: Mon, 24 Feb 2025 04:42:53 +0100 Subject: fix: split bundles, reproducible builds (hopefully) --- svelte.config.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'svelte.config.js') 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), + }, }, }; -- cgit v1.2.3