Skip to content

Commit

Permalink
(fix) always update files from .svelte-kit/types
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Aug 17, 2022
1 parent db23238 commit 28f75e9
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,14 @@ export class TypeScriptPlugin
const declarationExtensions = [ts.Extension.Dcts, ts.Extension.Dts, ts.Extension.Dmts];
const canSafelyIgnore =
declarationExtensions.every((ext) => !fileName.endsWith(ext)) &&
ignoredBuildDirectories.some((dir) => dirPathParts.includes(dir));

ignoredBuildDirectories.some((dir) => {
const index = dirPathParts.indexOf(dir);

return (
// Files in .svelte-kit/types should always come through
index > 0 && (dir !== '.svelte-kit' || dirPathParts[index + 1] !== 'types')
);
});
if (canSafelyIgnore) {
continue;
}
Expand Down

0 comments on commit 28f75e9

Please sign in to comment.