diff --git a/packages/cli/src/config/rollup.config.js b/packages/cli/src/config/rollup.config.js index 4c7156860..8aa6f56c2 100644 --- a/packages/cli/src/config/rollup.config.js +++ b/packages/cli/src/config/rollup.config.js @@ -287,7 +287,7 @@ function greenwoodPatchSsrPagesEntryPointRuntimeImport() { bundle[key].code = bundle[key].code.replace(/'___GWD_ENTRY_FILE_URL=(.*.)___'/, `new URL('./_${entryPathMatch}', import.meta.url)`); } else { - console.warn(`Could not find entry path match for bundle => ${ley}`); + console.warn(`Could not find entry path match for bundle => ${key}`); } } }); diff --git a/packages/plugin-adapter-vercel/src/index.js b/packages/plugin-adapter-vercel/src/index.js index 00ee5798b..fb15afb95 100644 --- a/packages/plugin-adapter-vercel/src/index.js +++ b/packages/plugin-adapter-vercel/src/index.js @@ -144,11 +144,14 @@ async function vercelAdapter(compilation) { new URL(`./${id}.js`, outputRoot), { recursive: true } ); - await fs.cp( - new URL('./api/assets/', outputDir), - new URL('./assets/', outputRoot), - { recursive: true } - ); + + if (await checkResourceExists(new URL('./api/assets/', outputDir))) { + await fs.cp( + new URL('./api/assets/', outputDir), + new URL('./assets/', outputRoot), + { recursive: true } + ); + } const ssrApiAssets = (await fs.readdir(new URL('./api/', outputDir))) .filter(file => new RegExp(/^[\w][\w-]*\.[a-zA-Z0-9]{4,20}\.[\w]{2,4}$/).test(path.basename(file)));