1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-19 04:12:37 +02:00

improve module detection (bundle)

This commit is contained in:
Thomas Wilkerling
2025-03-10 17:05:10 +01:00
parent 3a00dba465
commit fc83234339
3 changed files with 3 additions and 3 deletions

View File

@@ -361,7 +361,7 @@ else (async function(){
build = build.replace(/\(([a-z])=([a-z]).config\)&&\(([a-z])=([a-z])\)/, "($1=$2.config)&&($3=await import($4))");
if(release === "bundle"){
build = build.replace("(function(self){'use strict';", "(function _f(self){'use strict';try{if(module)self=module}catch(e){}self._factory=_f;");
build = build.replace("(function(self){'use strict';", "(function _f(self){'use strict';if(typeof module!=='undefined')self=module;self._factory=_f;");
}
// replace the eval wrapper