Skip to content

Commit

Permalink
New: pbjs now generates multiple exports when using ES6 syntax, see #686
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Mar 11, 2017
1 parent db1030e commit ac26a7a
Show file tree
Hide file tree
Showing 2 changed files with 410 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/targets/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function buildNamespace(ref, ns) {
return;
if (ns.name !== "") {
push("");
push(name(ref) + "." + name(ns.name) + " = (function() {");
if (!ref && config.es6)
push("export const " + name(ns.name) + " = " + name(ref) + "." + name(ns.name) + " = (function() {");
else
push(name(ref) + "." + name(ns.name) + " = (function() {");
++indent;
}

Expand Down
Loading

0 comments on commit ac26a7a

Please sign in to comment.