Skip to content

Commit ac26a7a

Browse files
committed
New: pbjs now generates multiple exports when using ES6 syntax, see #686
1 parent db1030e commit ac26a7a

File tree

2 files changed

+410
-1
lines changed

2 files changed

+410
-1
lines changed

Diff for: cli/targets/static.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ function buildNamespace(ref, ns) {
9696
return;
9797
if (ns.name !== "") {
9898
push("");
99-
push(name(ref) + "." + name(ns.name) + " = (function() {");
99+
if (!ref && config.es6)
100+
push("export const " + name(ns.name) + " = " + name(ref) + "." + name(ns.name) + " = (function() {");
101+
else
102+
push(name(ref) + "." + name(ns.name) + " = (function() {");
100103
++indent;
101104
}
102105

0 commit comments

Comments
 (0)