Skip to content

Commit 80c12de

Browse files
authored
Add semicolon at the end of UMD build (#129)
Allows for safe script concatenation; see Tampermonkey/tampermonkey#595
1 parent c9becc4 commit 80c12de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/buildUMD.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ minify(src, opts).then(async out => {
3232
const res = "!function(f){typeof module!='undefined'&&typeof exports=='object'?module.exports=f():typeof define!='undefined'&&define.amd?define(f):(typeof self!='undefined'?self:this).fflate=f()}(function(){var _e={};" +
3333
out.code!.replace(/exports\.(.*) = void 0;\n/, '').replace(/exports\./g, '_e.').replace(/require\("\.\/node-worker\.cjs"\)/,
3434
"(typeof module!='undefined'&&typeof exports=='object'?function(_f){" + nodeWkrOut + 'return _f}:function(_f){' + wkrOut + 'return _f})({})'
35-
) + 'return _e})';
35+
) + 'return _e});';
3636
if (!existsSync(p('umd'))) mkdirSync(p('umd'));
3737
writeFileSync(p('umd', 'index.js'), res);
3838
});

0 commit comments

Comments
 (0)