From 60806495c5d88e395b8427ad4e842c258683d931 Mon Sep 17 00:00:00 2001 From: shellscape Date: Sat, 23 Nov 2024 10:12:25 -0500 Subject: [PATCH] feat(jsx-email,app-preview): --base-path flag, deploy preview to sub path --- apps/preview/app/src/routes.tsx | 2 +- packages/jsx-email/src/cli/commands/preview.mts | 12 +++++++----- packages/jsx-email/src/cli/commands/types.mts | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/preview/app/src/routes.tsx b/apps/preview/app/src/routes.tsx index fa874f09..8a1afa85 100644 --- a/apps/preview/app/src/routes.tsx +++ b/apps/preview/app/src/routes.tsx @@ -48,7 +48,7 @@ export const getRouter = (templates: Record) => { ), errorElement: , - path: '/' + path: import.meta.env.VITE_JSXEMAIL_BASE_PATH || '/' }, ...routes ]); diff --git a/packages/jsx-email/src/cli/commands/preview.mts b/packages/jsx-email/src/cli/commands/preview.mts index b2eccdaa..3f43de31 100644 --- a/packages/jsx-email/src/cli/commands/preview.mts +++ b/packages/jsx-email/src/cli/commands/preview.mts @@ -35,6 +35,7 @@ Starts the preview server for a directory of email templates $ email preview