diff --git a/scripts/build.mjs b/scripts/build.mjs index b255ccd67..f832a89e2 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -33,6 +33,16 @@ await esbuild.build({ target: 'node14', plugins: [ + { + name: 'alias', + setup({ onResolve, resolve }) { + onResolve({ filter: /^prompts$/, namespace: 'file' }, async ({ importer, resolveDir }) => { + // we can always use non-transpiled code since we support 14.16.0+ + const result = await resolve('prompts/lib/index.js', { importer, resolveDir }) + return result + }) + } + }, esbuildPluginLicense({ thirdParty: { includePrivate: false,