From cf19a9fe2fa38a2972fbcb9e9bc09b2eff669992 Mon Sep 17 00:00:00 2001 From: Valexr Date: Sat, 18 Jan 2025 12:22:35 +0200 Subject: [PATCH] updeps --- esbuild.js | 8 ++++++-- package.json | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/esbuild.js b/esbuild.js index f5ca084..6f8c859 100644 --- a/esbuild.js +++ b/esbuild.js @@ -5,16 +5,19 @@ import rm from './env/rm.js'; import log from './env/log.js'; import meta from './env/meta.js'; import proxy from './env/proxy.js'; +import pkg from './package.json' with {type: 'json'}; const DEV = process.argv.includes('--dev'); const SPA = process.argv.includes('--spa'); const svelteOptions = { compilerOptions: { - dev: DEV, css: 'external', - immutable: true, + cssHash: ({ css, filename, name, hash }) => { + return `${pkg.name}-${hash(css)}`; + }, runes: true, + immutable: true, modernAst: true }, preprocess: [ @@ -39,6 +42,7 @@ const buildOptions = { logLevel: 'info', metafile: !DEV, mainFields: ['svelte', 'module', 'main'], + conditions: ['production', 'development'], }; await rm(['public/build']); diff --git a/package.json b/package.json index 3e4b0ad..a4a0fb2 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,12 @@ }, "devDependencies": { "@types/luxon": "^3.4.2", - "@types/node": "^22.10.0", - "esbuild": "^0.24.0", + "@types/node": "^22.10.7", + "esbuild": "^0.24.2", "esbuild-svelte": "^0.9.0", "luxon": "^3.5.0", - "svelte": "^5.2.9", + "svelte": "^5.19.0", "svelte-preprocess": "^6.0.3", - "typescript": "^5.7.2" + "typescript": "^5.7.3" } } \ No newline at end of file