| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c780a90 commit cf85c75
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,10 +59,22 @@ const umd = { | |||
| 59 | 59 | ||
| 60 | 60 | build.initialOptions.banner = { | |
| 61 | 61 | js: ` | |
| 62 | - (function (global, factory, m) { | ||
| 63 | - typeof exports === 'object' && typeof module !== 'undefined' ? factory(module${requireDeps.join(', ')}) : | ||
| 64 | - typeof define === 'function' && define.amd ? define(['module'${amdDeps.join(', ')}], factory) : | ||
| 65 | - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(m = { exports: {} }${browserDeps.join(', ')}), global.${browserGlobal} = 'default' in m.exports ? m.exports.default : m.exports); | ||
| 62 | + (function (global, factory) { | ||
| 63 | + if (typeof exports === 'object' && typeof module !== 'undefined') { | ||
| 64 | + factory(module${requireDeps.join(', ')}); | ||
| 65 | + module.exports = def(module); | ||
| 66 | + } else if (typeof define === 'function' && define.amd) { | ||
| 67 | + define(['module'${amdDeps.join(', ')}], function(mod) { | ||
| 68 | + factory.apply(this, arguments); | ||
| 69 | + mod.exports = def(mod); | ||
| 70 | + }); | ||
| 71 | + } else { | ||
| 72 | + const mod = { exports: {} }; | ||
| 73 | + factory(mod${browserDeps.join(', ')}); | ||
| 74 | + global = typeof globalThis !== 'undefined' ? globalThis : global || self; | ||
| 75 | + global.${browserGlobal} = def(mod); | ||
| 76 | + } | ||
| 77 | + function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } | ||
| 66 | 78 | })(this, (function (module${locals.join(', ')}) { | |
| 67 | 79 | `.trim(), | |
| 68 | 80 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments