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

support for inline worker

This commit is contained in:
Thomas Wilkerling
2021-05-22 20:29:35 +02:00
parent 1ec73ca2c9
commit f178c7a5fb
13 changed files with 481 additions and 329 deletions

View File

@@ -137,7 +137,7 @@ let parameter = (function(opt){
rewrite_polyfills: use_polyfill || false,
// isolation_mode: "IIFE",
output_wrapper: "(function(self){%output%}(module));"
output_wrapper: "(function(self){%output%}(this));"
//formatting: "PRETTY_PRINT"
});
@@ -232,6 +232,8 @@ else{
preserve = preserve.replace("* FlexSearch.js", "* FlexSearch.js v" + package_json.version + (light_version ? " (Light)" : es5_version ? " (ES5)" : ""));
build = preserve.substring(0, preserve.indexOf('*/') + 2) + "\n" + build;
build = build.replace("(function(self){'use strict';", "(function _f(self){'use strict';try{if(module)self=module}catch(e){}self._factory=_f;");
if(release === "pre"){
fs.existsSync("test/dist") || fs.mkdirSync("test/dist");