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
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,24 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
* Allow tree-shaking of the `Symbol` constructor
6
+
7
+
With this release, calling `Symbol` is now considered to be side-effect free when the argument is known to be a primitive value. This means esbuild can now tree-shake module-level symbol variables:
8
+
9
+
```js
10
+
// Original code
11
+
consta=Symbol('foo')
12
+
constb=Symbol(bar)
13
+
14
+
// Old output (with --tree-shaking=true)
15
+
consta=Symbol("foo");
16
+
constb=Symbol(bar);
17
+
18
+
// New output (with --tree-shaking=true)
19
+
constb=Symbol(bar);
20
+
```
21
+
3
22
## 0.27.0
4
23
5
24
**This release deliberately contains backwards-incompatible changes.** To avoid automatically picking up releases like this, you should either be pinning the exact version of`esbuild`in your `package.json`file (recommended) or be using a version range syntax that only accepts patch upgrades such as `^0.26.0` or `~0.26.0`. See npm's documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information.
0 commit comments