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
After running it through buble --yes dangerousTaggedTemplateString sourcedir -o targetdir it outputs:
bar
bar
This happens because both transpiled files put the quasis into global variables called templateObject, which then overwrite each other. I think this is what was pointed out on the original PR here: #67 (comment)
In general I would assume that the "compile directory" mode of buble would avoid introducing colliding identifiers in the root scope across all the files. I think using this mode to transpile a bunch of test files for execution in a browser is a very common use case? Maybe the root scope object could just be carried over to the subsequent files so the var would come out as templateObject$1 in the second file?
Babel has the same bug btw. :)
The text was updated successfully, but these errors were encountered:
Given a setup like this:
foo.js
bar.js
index.html
Running the above in a browser outputs:
After running it through
buble --yes dangerousTaggedTemplateString sourcedir -o targetdir
it outputs:This happens because both transpiled files put the quasis into global variables called
templateObject
, which then overwrite each other. I think this is what was pointed out on the original PR here: #67 (comment)In general I would assume that the "compile directory" mode of buble would avoid introducing colliding identifiers in the root scope across all the files. I think using this mode to transpile a bunch of test files for execution in a browser is a very common use case? Maybe the root
scope
object could just be carried over to the subsequent files so the var would come out astemplateObject$1
in the second file?Babel has the same bug btw. :)
The text was updated successfully, but these errors were encountered: