Skip to content

Commit

Permalink
patch adapters clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Dec 28, 2023
1 parent c388c40 commit 3dd888f
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions patches/@greenwood+plugin-adapter-vercel+0.29.0.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
diff --git a/node_modules/@greenwood/plugin-adapter-vercel/src/index.js b/node_modules/@greenwood/plugin-adapter-vercel/src/index.js
index 77602ae..cb59799 100644
index 77602ae..5250fbf 100644
--- a/node_modules/@greenwood/plugin-adapter-vercel/src/index.js
+++ b/node_modules/@greenwood/plugin-adapter-vercel/src/index.js
@@ -103,32 +103,6 @@ async function vercelAdapter(compilation) {
@@ -83,7 +83,6 @@ async function vercelAdapter(compilation) {
}));

const files = await fs.readdir(outputDir);
- const isExecuteRouteModule = files.find(file => file.startsWith('execute-route-module'));

for (const page of ssrPages) {
const outputType = 'page';
@@ -103,32 +102,6 @@ async function vercelAdapter(compilation) {
new URL(`./__${id}.js`, outputRoot),
{ recursive: true }
);
Expand Down Expand Up @@ -35,7 +43,7 @@ index 77602ae..cb59799 100644
}

for (const [key] of apiRoutes) {
@@ -138,32 +112,11 @@ async function vercelAdapter(compilation) {
@@ -138,22 +111,13 @@ async function vercelAdapter(compilation) {

await setupFunctionBuildFolder(id, outputType, outputRoot);

Expand All @@ -46,7 +54,7 @@ index 77602ae..cb59799 100644
new URL(`./${id}.js`, outputRoot),
{ recursive: true }
);
-
- if (await checkResourceExists(new URL('./api/assets/', outputDir))) {
- await fs.cp(
- new URL('./api/assets/', outputDir),
Expand All @@ -55,16 +63,7 @@ index 77602ae..cb59799 100644
- );
- }
-
- 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)));
-
- for (const asset of ssrApiAssets) {
- await fs.cp(
- new URL(`./${asset}`, new URL('./api/', outputDir)),
- new URL(`./${asset}`, outputRoot),
- { recursive: true }
- );
- }
}
+ // need this for URL referenced chunks
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)));

// static assets / build

0 comments on commit 3dd888f

Please sign in to comment.