From 4660bbcb23f5782b9330d855e81290a31fec488b Mon Sep 17 00:00:00 2001 From: shellscape Date: Mon, 4 Nov 2024 10:59:11 -0500 Subject: [PATCH] fix(jsx-email): dont declare exports for cjs build. fixes #235 --- packages/jsx-email/src/config.ts | 5 +++-- test/cli/.snapshots/create-jsx-email.test.ts.snap | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/jsx-email/src/config.ts b/packages/jsx-email/src/config.ts index 39483f78..f810f25b 100644 --- a/packages/jsx-email/src/config.ts +++ b/packages/jsx-email/src/config.ts @@ -239,8 +239,9 @@ export const loadConfig = async (startDir?: string): Promise => log.debug('loadConfig →', { cwd: process.cwd(), searchResult, startDir }); - const exports: ConfigExports = searchResult?.config ?? {}; - const intermediate = exports.config instanceof Promise ? await exports.config : exports.config; + const configExports: ConfigExports = searchResult?.config ?? {}; + const intermediate = + configExports.config instanceof Promise ? await configExports.config : configExports.config; const config = intermediate ?? { ...defaults }; if ((config as any).symbol === configSymbol) { diff --git a/test/cli/.snapshots/create-jsx-email.test.ts.snap b/test/cli/.snapshots/create-jsx-email.test.ts.snap index bd67cfb2..ac2bbbb4 100644 --- a/test/cli/.snapshots/create-jsx-email.test.ts.snap +++ b/test/cli/.snapshots/create-jsx-email.test.ts.snap @@ -2,7 +2,7 @@ exports[`create-jsx-email > command 1`] = ` " -create-jsx-email v2.0.3 +create-jsx-email v2.0.4 The fastest way to get started with JSX Email