Skip to content

Commit

Permalink
dont remove .vercel/output directory (#5555)
Browse files Browse the repository at this point in the history
* dont remove .vercel/output directory - fixes #5207

* empty out .func dir before repopulating
  • Loading branch information
Rich-Harris authored Jul 16, 2022
1 parent fb5ea3a commit 2a9c192
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twenty-vans-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-vercel': patch
---

Don't remove .vercel/output directory
3 changes: 2 additions & 1 deletion packages/adapter-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export default function ({ external = [], edge, split } = {}) {

const tmp = builder.getBuildDirectory('vercel-tmp');

builder.rimraf(dir);
builder.rimraf(tmp);

const files = fileURLToPath(new URL('./files', import.meta.url).href);
Expand Down Expand Up @@ -295,6 +294,8 @@ function get_node_version() {
* @param {string} runtime
*/
async function create_function_bundle(builder, entry, dir, runtime) {
fs.rmSync(dir, { force: true, recursive: true });

let base = entry;
while (base !== (base = path.dirname(base)));

Expand Down

0 comments on commit 2a9c192

Please sign in to comment.