Skip to content

Commit 6b06da8

Browse files
authored
Fix adapter to only glob files (#6492)
1 parent 70bc001 commit 6b06da8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: .changeset/cold-penguins-share.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-netlify': patch
3+
---
4+
5+
Update adapter to only glob files

Diff for: packages/adapter-netlify/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async function generate_lambda_functions({ builder, publish, split, esm }) {
163163
if (esm) {
164164
builder.copy(`${files}/esm`, '.netlify', { replace });
165165
} else {
166-
glob('**/*.js', { cwd: '.netlify/server' }).forEach((file) => {
166+
glob('**/*.js', { cwd: '.netlify/server', filesOnly: true }).forEach((file) => {
167167
const filepath = `.netlify/server/${file}`;
168168
const input = readFileSync(filepath, 'utf8');
169169
const output = esbuild.transformSync(input, { format: 'cjs', target: 'node12' }).code;

0 commit comments

Comments
 (0)