From: 翠 / green Date: Tue, 12 Jul 2022 09:09:04 +0000 (+0900) Subject: perf: exclude transpiled prompts code (#121) X-Git-Tag: v3.2.3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e50e5d83405e3915d2378d58e7d7b23ea7a4f2fd;p=thirdparty%2Fvuejs%2Fcreate-vue.git perf: exclude transpiled prompts code (#121) --- diff --git a/scripts/build.mjs b/scripts/build.mjs index b255ccd6..f832a89e 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,