Skip to content

Commit

Permalink
Merge pull request remix-run#252 from remix-run/jacob/rem-187-cleanup…
Browse files Browse the repository at this point in the history
…-dist-directories-when-dev-server

feat: cleanup dist directories when dev mode ends
  • Loading branch information
mjackson authored Aug 20, 2021
2 parents 8a3aa49 + 46bf9a0 commit 996af57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/remix-dev/cli/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as path from "path";
import * as fse from "fs-extra";
import signalExit from "signal-exit";
import prettyMs from "pretty-ms";
import WebSocket from "ws";
@@ -76,6 +77,11 @@ export async function watch(
})
);

signalExit(() => {
fse.emptyDirSync(config.assetsBuildDirectory);
fse.emptyDirSync(config.serverBuildDirectory);
});

console.log(`💿 Built in ${prettyMs(Date.now() - start)}`);
}

0 comments on commit 996af57

Please sign in to comment.