Updates and cleanup
Some checks failed
/ build (push) Failing after 58s
/ check-changes (push) Successful in 5s

This commit is contained in:
Djuri 2024-12-20 17:16:50 +01:00
parent 551d714cce
commit cefa98148a
4 changed files with 252 additions and 87 deletions

View file

@ -1,6 +1,7 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import GithubActionsReporter from 'vitest-github-actions-reporter';
// import { visualizer } from 'rollup-plugin-visualizer';
import * as fs from 'fs';
import * as path from 'path';
@ -65,14 +66,29 @@ export default defineConfig({
}
}
}
// visualizer({
// emitFile: true,
// filename: "stats.html",
// })
],
build: {
minify: true,
minify: 'esbuild',
cssCodeSplit: false,
rollupOptions: {
output: {
manualChunks: () => 'app',
assetFileNames: '[name][extname]'
// assetFileNames: '[hash][extname]',
entryFileNames: `[hash][extname]`,
chunkFileNames: `[hash][extname]`,
assetFileNames: `[hash][extname]`,
preserveModules: false,
manualChunks: (id) => {
if (id.includes('node_modules')) {
return 'vendor';
} else {
return 'app';
}
}
}
}
},