From 0841d86ef50ed94ab3e1bc7ba95a720dba2ff44d Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Sat, 6 Apr 2024 05:38:23 +0800 Subject: [PATCH] improve documentation --- packages/runtime/src/enhancements/password.ts | 2 +- packages/schema/src/plugins/plugin-utils.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/enhancements/password.ts b/packages/runtime/src/enhancements/password.ts index 09a4ad1cb..297613e1b 100644 --- a/packages/runtime/src/enhancements/password.ts +++ b/packages/runtime/src/enhancements/password.ts @@ -24,7 +24,7 @@ export function withPassword( ); } -// `bcryptjs.hash` is good for performance but it doesn't work in edge runtime, +// `bcryptjs.hash` is good for performance but it doesn't work in vercel edge runtime, // so we fall back to `bcrypt.hash` in that case. // eslint-disable-next-line no-var diff --git a/packages/schema/src/plugins/plugin-utils.ts b/packages/schema/src/plugins/plugin-utils.ts index 5f5cf7cf8..58e485158 100644 --- a/packages/schema/src/plugins/plugin-utils.ts +++ b/packages/schema/src/plugins/plugin-utils.ts @@ -68,6 +68,8 @@ export function ensureDefaultOutputFolder(options: PluginRunnerOptions) { }, }; + // create stubs for zod exports to make bundlers that statically + // analyze imports (like Next.js) happy for (const zodFolder of ['models', 'input', 'objects']) { fs.mkdirSync(path.join(output, 'zod', zodFolder), { recursive: true }); fs.writeFileSync(path.join(output, 'zod', zodFolder, 'index.js'), '');