Skip to content

Commit

Permalink
Fix adapter to only glob files (#6492)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjkb authored Aug 31, 2022
1 parent 70bc001 commit 6b06da8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cold-penguins-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-netlify': patch
---

Update adapter to only glob files
2 changes: 1 addition & 1 deletion packages/adapter-netlify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function generate_lambda_functions({ builder, publish, split, esm }) {
if (esm) {
builder.copy(`${files}/esm`, '.netlify', { replace });
} else {
glob('**/*.js', { cwd: '.netlify/server' }).forEach((file) => {
glob('**/*.js', { cwd: '.netlify/server', filesOnly: true }).forEach((file) => {
const filepath = `.netlify/server/${file}`;
const input = readFileSync(filepath, 'utf8');
const output = esbuild.transformSync(input, { format: 'cjs', target: 'node12' }).code;
Expand Down

0 comments on commit 6b06da8

Please sign in to comment.