-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
With the static adapter, using both precompress and fallback options generates differen build/index.html and build/index.html.gz.
i.e. if the Gzip file is decompressed, it's content does not exactly match the one of the plain html file. The relative paths in the Gzip file becomes prefixed with a dot.
This leads to an issue when Gzip content is provided over the wire and certification are calculated on the client side.
svelte.config:
kit: {
adapter: adapter({
fallback: 'index.html',
precompress: true
})
}
generated index.html:
<link rel="modulepreload" href="/_app/immutable/start-6aae8ae3.js">
import { start } from "/_app/immutable/start-6aae8ae3.js";
generated unzipped index.html.gz:
<link rel="modulepreload" href="./_app/immutable/start-6aae8ae3.js">
import { start } from "./_app/immutable/start-6aae8ae3.js";
Reproduction
git clone https://github.com/peterpeterparker/my-app-gzip
cd my-app-gzip
npm i
npm run build
cd build
cp index.html.gz test.html.gz
gunzip test.html.gz
diff index.html test.html
Logs
No response
System Info
System:
OS: macOS 13.1
CPU: (8) arm64 Apple M2
Memory: 97.70 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.14.0 - /usr/local/bin/node
npm: 8.19.2 - /opt/homebrew/bin/npm
Browsers:
Brave Browser: 110.1.48.158
Chrome: 109.0.5414.119
Firefox: 109.0.1
Safari: 16.2Severity
annoyance
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working