Skip to content

Commit

Permalink
workaround ts type narrowing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
gtm-nayan committed Sep 22, 2024
1 parent 1bc9d80 commit 7815107
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,8 @@ async function kit({ svelte_config }) {

for (const file in bundle) {
if (bundle[file].type !== 'chunk') continue;
let code = bundle[file].code;
const chunk = /** @type {import('rollup').OutputChunk} */ (bundle[file]);
let code = chunk.code;
if (
!(code.includes(app_version_placeholder) || code.includes(app_version_hash_placeholder))
)
Expand All @@ -965,7 +966,7 @@ async function kit({ svelte_config }) {
);
}

bundle[file].code = code;
chunk.code = code;
}
}
};
Expand Down

0 comments on commit 7815107

Please sign in to comment.