Closed jacobpake closed 1 month ago
I have changed the kit.version.name
to the current commit hash as suggested here and that fixes the issue for me
I need this too. I have added a javascript error handler that logs errors to our slack. You cannot believe the amount of errors we are getting from facebook and tiktok trying to preload the site but the files it knows of have changed and its failing to preload css and js because the file names are constantly changing.
The fact that all file hashes change without changes even happening in the files is terrible behaviour.
Describe the bug
Immutable chunks with references to
$app/stores
get a different hash on every build.My component
Produces the following outputs on immediately subsequent builds with no code changes:
MyComponent-{hash}.js
importspage
fromstores-{hash}.js
which imports fromentry-{hash}.js
.entry-{hash}.js
is different on every build because of the version number.If this is not by design, is there any way to separate the version number from these stores (and other entry.js exports which do not rely on the version number)?
If this is by design, are there any suggestions to avoid this?
My desired outcome is that the output Javascript filename is the same on subsequent builds without code changes.
Reproduction
Minimal reproduction
I have created a new skeleton SvelteKit project, added MyComponent (below) and imported it from two separate pages in routes so that it is included as a chunk.
Logs
No response
System Info
Severity
annoyance
Additional Information
No response