Skip to content

Commit 33d1068

Browse files
committed
Tweak our JavaScript rewrites a bit to handle jspb.* imports.
1 parent df9e024 commit 33d1068

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

commonjs/rewrite_tests_for_commonjs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ lineReader.on('line', function(line) {
8080
if (isRequire) {
8181
if (module) { // Skip goog.require() lines before the first directive.
8282
var fullSym = isRequire[1];
83+
// Skip lines importing from jspb.*, these are handled by the header above.
84+
if (fullSym.match(/^jspb\./)) return;
8385
var sym = tryStripPrefix(fullSym, pkg);
8486
console.log("googleProtobuf.exportSymbol('" + fullSym + "', " + module + sym + ', global);');
8587
}

0 commit comments

Comments
 (0)