Skip to content

Commit

Permalink
perf: shorten file names (#13003)
Browse files Browse the repository at this point in the history
entry file names and asset names are untouched. chunk file names are often misleading because they may contain more (or less) than what the filename suggests.
  • Loading branch information
benmccann authored Jan 16, 2025
1 parent 04958cc commit d440c68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-foxes-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

perf: shorten chunk file names
4 changes: 2 additions & 2 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ async function kit({ svelte_config }) {
format: inline ? 'iife' : 'esm',
name: `__sveltekit_${version_hash}.app`,
entryFileNames: ssr ? '[name].js' : `${prefix}/[name].[hash].${ext}`,
chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[name].[hash].${ext}`,
chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[hash].${ext}`,
assetFileNames: `${prefix}/assets/[name].[hash][extname]`,
hoistTransitiveImports: false,
sourcemapIgnoreList,
Expand All @@ -676,7 +676,7 @@ async function kit({ svelte_config }) {
rollupOptions: {
output: {
entryFileNames: `${prefix}/workers/[name]-[hash].js`,
chunkFileNames: `${prefix}/workers/chunks/[name]-[hash].js`,
chunkFileNames: `${prefix}/workers/chunks/[hash].js`,
assetFileNames: `${prefix}/workers/assets/[name]-[hash][extname]`,
hoistTransitiveImports: false
}
Expand Down

0 comments on commit d440c68

Please sign in to comment.