From 6dbd4b0f072a5e3368b89586fb5037bc589eec3d Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:04:41 +0900 Subject: [PATCH] chore: fix type errors --- packages/vite/src/node/build.ts | 8 ++++---- packages/vite/src/node/constants.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index 5f585cce4e3215..5c02c35e98d271 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -1329,10 +1329,10 @@ const relativeUrlMechanisms: Record< // getResolveUrl( // `'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url`, // ), - // umd: (relativePath) => - // `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( - // relativePath, - // )} : ${getRelativeUrlFromDocument(relativePath, true)})`, + umd: (relativePath) => + `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath( + relativePath, + )} : ${getRelativeUrlFromDocument(relativePath, true)})`, } /* end of copy */ diff --git a/packages/vite/src/node/constants.ts b/packages/vite/src/node/constants.ts index b3517806494c78..02e347eae6ac8d 100644 --- a/packages/vite/src/node/constants.ts +++ b/packages/vite/src/node/constants.ts @@ -26,10 +26,10 @@ export const ROLLUP_HOOKS = [ 'intro', 'outro', 'closeBundle', - // 'closeWatcher', + 'closeWatcher', 'load', 'moduleParsed', - // 'watchChange', + 'watchChange', 'resolveDynamicImport', 'resolveId', // 'shouldTransformCachedModule',