From 33c6ca723c12632b649bedb9bbcffcca25f8e3a4 Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 28 Jul 2023 07:09:39 -0400 Subject: [PATCH] this is typescript now too --- index.mjs => index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename index.mjs => index.ts (95%) diff --git a/index.mjs b/index.ts similarity index 95% rename from index.mjs rename to index.ts index 1791d7f..5798937 100644 --- a/index.mjs +++ b/index.ts @@ -43,7 +43,7 @@ export function buildConfig ({ return finalName; } - function getOutputFilename (entryPath, ext) { + function getOutputFilename (entryPath, ext?) { const base = relative(manifestDirname, dirname(entryPath)); return join(base, uniqueFileNameSegment(entryPath, ext)); } @@ -92,8 +92,8 @@ export function buildConfig ({ // Emit the asset as part of the build step this.emitFile({ type: 'asset', - fileName: getOutputFilename(absolutePath), - source: readFileSync(absolutePath), + fileName: outPath, + source: readFileSync(path), }); }); },