@@ -59,10 +59,22 @@ const umd = {
5959
6060 build . initialOptions . banner = {
6161 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; }
6678})(this, (function (module${ locals . join ( ', ' ) } ) {
6779 ` . trim ( ) ,
6880 } ;
0 commit comments