From a6d3f6ba03db4ba4b3948cec5f4bd954af9d04b0 Mon Sep 17 00:00:00 2001 From: Matthew Gross Date: Fri, 6 Sep 2024 12:11:43 -0700 Subject: [PATCH] change dirname --- packages/trpc-panel/src/render.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/trpc-panel/src/render.ts b/packages/trpc-panel/src/render.ts index a1d1f32..09b9648 100644 --- a/packages/trpc-panel/src/render.ts +++ b/packages/trpc-panel/src/render.ts @@ -17,14 +17,14 @@ const defaultParseRouterOptions: Partial = { transformer: "superjson", }; -const __dirname = dirname(fileURLToPath(import.meta.url)); +const directoryName = dirname(fileURLToPath(import.meta.url)); const javascriptReplaceSymbol = "{{js}}"; const cssReplaceSymbol = "{{css}}"; const routerReplaceSymbol = '"{{parsed_router}}"'; const optionsReplaceSymbol = '"{{options}}"'; -const bundlePath = __dirname + "/react-app/bundle.js"; -const indexPath = __dirname + "/react-app/index.html"; -const cssPath = __dirname + "/react-app/index.css"; +const bundlePath = directoryName + "/react-app/bundle.js"; +const indexPath = directoryName + "/react-app/index.html"; +const cssPath = directoryName + "/react-app/index.css"; const bundleJs = fs.readFileSync(bundlePath).toString(); const indexHtml = fs.readFileSync(indexPath).toString(); const indexCss = fs.readFileSync(cssPath).toString();