From a376a6c78cb276c0e5cb812c388a6ab88cdcde1f Mon Sep 17 00:00:00 2001 From: gfyoung Date: Sat, 2 Oct 2021 11:58:53 -0700 Subject: [PATCH] Use named define for requireJS Two benefits: * Helps avoid with mismatched anonymous errors ref: https://requirejs.org/docs/errors.html#mismatch * Allows for uglification in the demo --- bits/99_footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits/99_footer.js b/bits/99_footer.js index 7806d41..cbfa12d 100644 --- a/bits/99_footer.js +++ b/bits/99_footer.js @@ -3,7 +3,7 @@ /*:: declare var define:any; */ if(typeof exports !== 'undefined') make_xlsx_lib(exports); else if(typeof module !== 'undefined' && module.exports) make_xlsx_lib(module.exports); -else if(typeof define === 'function' && define.amd) define(function() { if(!XLSX.version) make_xlsx_lib(XLSX); return XLSX; }); +else if(typeof define === 'function' && define.amd) define('xlsx-dist', function() { if(!XLSX.version) make_xlsx_lib(XLSX); return XLSX; }); else make_xlsx_lib(XLSX); /*exported XLS, ODS */ var XLS = XLSX, ODS = XLSX;