fix: Fix detected wasm file size being wrong (#1525)

This commit is contained in:
iTrooz
2024-02-01 15:03:33 +01:00
committed by GitHub
parent be0e50f983
commit 7546655695
2 changed files with 22 additions and 8 deletions

5
dist/web/Dockerfile vendored
View File

@@ -73,10 +73,15 @@ cp /imhex/dist/web/source/* /build
ccache -s
EOF
# Create a file dedicated to store wasm size, because I know no way to get the wasm content length if the web server uses compression
# See https://stackoverflow.com/questions/41701849/cannot-modify-accept-encoding-with-fetch https://github.com/AnthumChris/fetch-progress-indicators/issues/13
RUN du -b /build/imhex.wasm | cut -f1 > imhex.wasm.size
FROM scratch as raw
COPY --from=build [ \
# ImHex \
"/build/imhex.wasm", \
"/build/imhex.wasm.size", \
"/build/imhex.js", \
"/build/imhex.worker.js", \
\