Skip to content

Commit

Permalink
fix(jsx-email): dont declare exports for cjs build. fixes #235
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Nov 4, 2024
1 parent b1f6449 commit 4660bbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/jsx-email/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ export const loadConfig = async (startDir?: string): Promise<JsxEmailConfig> =>

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) {
Expand Down
2 changes: 1 addition & 1 deletion test/cli/.snapshots/create-jsx-email.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4660bbc

Please sign in to comment.