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
+22
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,27 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
* Add a log message for ambiguous re-exports ([#2322](https://github.com/evanw/esbuild/issues/2322))
6
+
7
+
In JavaScript, you can re-export symbols from another file using `export * from './another-file'`. When you do this from multiple files that export different symbols with the same name, this creates an ambiguous export which is causes that name to not be exported. This is harmless if you don't plan on using the ambiguous export name, so esbuild doesn't have a warning for this. But if you do want a warning for this (or if you want to make it an error), you can now opt-in to seeing this log message with `--log-override:ambiguous-import=warning` or `--log-override:ambiguous-import=error`. The log message looks like this:
8
+
9
+
```
10
+
▲ [WARNING] Re-export of "common" in "example.js" is ambiguous and has been removed [ambiguous-import]
11
+
12
+
One definition of "common" comes from "a.js" here:
13
+
14
+
a.js:2:11:
15
+
2 │ export let common = 2
16
+
╵ ~~~~~~
17
+
18
+
Another definition of "common" comes from "b.js" here:
19
+
20
+
b.js:3:14:
21
+
3 │ export { b as common }
22
+
╵ ~~~~~~
23
+
```
24
+
3
25
## 0.14.44
4
26
5
27
* Add a `copy` loader ([#2255](https://github.com/evanw/esbuild/issues/2255))
0 commit comments