diff --git a/.github/workflows/size-compare.yml b/.github/workflows/size-compare.yml index 40da2aad617..32e5f40b736 100644 --- a/.github/workflows/size-compare.yml +++ b/.github/workflows/size-compare.yml @@ -12,7 +12,7 @@ name: Compare Sizes ########################################################################################## on: - pull_request_target: + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -64,7 +64,11 @@ jobs: - name: Strip content hashes from stats files run: | + sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./head/web-stats.json + sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./head/web-stats.json sed -i -E 's/\.[0-9a-f]{8,}\././g' ./head/*.json + sed -i -E 's/index\.[0-9a-zA-Z_-]{8,}\./index./g' ./base/web-stats.json + sed -i -E 's/\.[0-9a-zA-Z_-]{8,}\.chunk\././g' ./base/web-stats.json sed -i -E 's/\.[0-9a-f]{8,}\././g' ./base/*.json - uses: twk3/rollup-size-compare-action@v1.0.0 with: diff --git a/packages/desktop-client/vite.config.mts b/packages/desktop-client/vite.config.mts index 6caaf0f5846..a46ef6d6e8b 100644 --- a/packages/desktop-client/vite.config.mts +++ b/packages/desktop-client/vite.config.mts @@ -122,10 +122,10 @@ export default defineConfig(async ({ mode }) => { } else if (/woff|woff2/.test(extType)) { extType = 'media'; } - return `static/${extType}/[name]-[hash][extname]`; + return `static/${extType}/[name].[hash][extname]`; }, - chunkFileNames: 'static/js/[name]-[hash].js', - entryFileNames: 'static/js/[name]-[hash].js', + chunkFileNames: 'static/js/[name].[hash].chunk.js', + entryFileNames: 'static/js/[name].[hash].js', }, }, },