Skip to content

Commit

Permalink
[fix] clear out build directory when running adapter-netlify (#7159)
Browse files Browse the repository at this point in the history
* [fix] clear out build directory when running `adapter-netlify`

* Create sharp-lies-grin.md
  • Loading branch information
benmccann authored Oct 10, 2022
1 parent 3bd5245 commit 2555e64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-lies-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/adapter-netlify": patch
---

[fix] clear out build directory when running `adapter-netlify`
1 change: 1 addition & 0 deletions packages/adapter-netlify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function ({ split = false, edge = edge_set_in_env_var } = {}) {
const publish = get_publish_directory(netlify_config, builder) || 'build';

// empty out existing build directories
builder.rimraf(publish);
builder.rimraf('.netlify/edge-functions');
builder.rimraf('.netlify/functions-internal');
builder.rimraf('.netlify/server');
Expand Down

0 comments on commit 2555e64

Please sign in to comment.