Skip to content

Commit

Permalink
fix: run compiler.close for store cache after build (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia authored Nov 18, 2021
1 parent e804824 commit 5e2cef2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/build-scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.2.1

- [fix] run `compiler.close()` for store cache after build

## 1.2.0

- [feat] auto load config of `build.config.(js|ts)`
Expand Down
2 changes: 1 addition & 1 deletion packages/build-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-scripts",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"description": "scripts core",
"main": "lib/index.js",
Expand Down
3 changes: 3 additions & 0 deletions packages/build-scripts/src/service/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ export = async function(context: Context, options?: IRunOptions): Promise<void |
stats,
});
if (isSuccessful) {
// https://github.com/webpack/webpack/issues/12345#issuecomment-755273757
// run `compiler.close()` to start to store cache
compiler?.close?.(()=>{});
resolve({
stats,
});
Expand Down

0 comments on commit 5e2cef2

Please sign in to comment.