You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,27 @@
43
43
}
44
44
```
45
45
46
+
* Minifier: allow reording a primitive past a side-effect ([#3568](https://github.com/evanw/esbuild/issues/3568))
47
+
48
+
The minifier previously allowed reordering a side-effect past a primitive, but didn't handle the case of reordering a primitive past a side-effect. This additional case is now handled:
49
+
50
+
```js
51
+
// Original code
52
+
function f() {
53
+
let x = false;
54
+
let y = x;
55
+
const boolean = y;
56
+
let frag = $.template(`<p contenteditable="${boolean}">hello world</p>`);
57
+
return frag;
58
+
}
59
+
60
+
// Old output (with --minify)
61
+
function f(){const e=!1;return $.template(`<p contenteditable="${e}">hello world</p>`)}
62
+
63
+
// New output (with --minify)
64
+
function f(){return $.template('<p contenteditable="false">hello world</p>')}
65
+
```
66
+
46
67
* Provide the `stop()` API in node to exit esbuild's child process ([#3558](https://github.com/evanw/esbuild/issues/3558))
47
68
48
69
You can now call `stop()` in esbuild's node API to exit esbuild's child process to reclaim the resources used. It only makes sense to do this for a long-lived node process when you know you will no longer be making any more esbuild API calls. It is not necessary to call this to allow node to exit, and it's advantageous to not call this in between calls to esbuild's API as sharing a single long-lived esbuild child process is more efficient than re-creating a new esbuild child process for every API call. This API call used to exist but was removed in [version 0.9.0](https://github.com/evanw/esbuild/releases/v0.9.0). This release adds it back due to a user request.
0 commit comments