Skip to content

Commit 7fad0d1

Browse files
committed
handle that 2235default is now gone
1 parent 3b8a02c commit 7fad0d1

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

jscomp/core/js_dump.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ and vident cxt f (v : J.vident) =
500500
| Qualified ({ id; kind = Ml | Runtime }, Some name) ->
501501
let cxt = Ext_pp_scope.ident cxt f id in
502502
P.string f L.dot;
503-
P.string f (Ext_ident.convert name);
503+
P.string f
504+
(if name = Js_dump_import_export.default_export then name
505+
else Ext_ident.convert name);
504506
cxt
505507
| Qualified ({ id; kind = External _ }, Some name) ->
506508
let cxt = Ext_pp_scope.ident cxt f id in

jscomp/core/js_dump_import_export.mli

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

25+
val default_export : string
26+
2527
val exports : Ext_pp_scope.t -> Ext_pp.t -> Ident.t list -> Ext_pp_scope.t
2628

2729
val es6_export : Ext_pp_scope.t -> Ext_pp.t -> Ident.t list -> Ext_pp_scope.t

jscomp/test/es6_import.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/es6_import.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import * as Es6_export from "./es6_export.mjs";
44

5-
console.log(Es6_export.$$default);
5+
console.log(Es6_export.default);
66

77
export {
88

0 commit comments

Comments
 (0)