1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-24 14:42:55 +02:00

fix node.js exports, resolve eval

This commit is contained in:
Thomas Wilkerling
2024-01-08 01:49:39 +01:00
parent 5c54b465a8
commit a0a798d7fe
22 changed files with 32 additions and 55 deletions

View File

@@ -276,9 +276,11 @@ exec(executable + parameter + " --js='tmp/**.js' --js='!tmp/**/node.js'" + flag_
if(release === "bundle"){
build = build.replace("(function(self){'use strict';", "(function _factory(self){'use strict';");
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(/eval\('(.*)'\)/, "$1");
if(release === "bundle.module" || release === "light.module" || release === "compact.module"){
build = build.replace(/self\.FlexSearch(\s+)?=(\s+)?/, "export default ");