## Custom Builds The `/src/` folder of this repository requires some compilation to resolve the build flags. Those are your options: - Closure Compiler (Advanced Compilation) - Babel + Plugin `babel-plugin-conditional-compile` You can't resolve build flags with: - Webpack - esbuild - rollup - Terser You can run any of the basic builds located in the `/dist/` folder, e.g.: ```bash npm run build:bundle npm run build:light npm run build:module ``` Perform a custom build (UMD bundle) by passing build flags: ```bash npm run build:custom SUPPORT_DOCUMENT=true SUPPORT_TAGS=true LANGUAGE_OUT=ECMASCRIPT5 POLYFILL=true ``` Perform a custom build in ESM module format: ```bash npm run build:custom RELEASE=custom.module SUPPORT_DOCUMENT=true SUPPORT_TAGS=true ``` Perform a debug build: ```bash npm run build:custom DEBUG=true SUPPORT_DOCUMENT=true SUPPORT_TAGS=true ``` > On custom builds each build flag will be set to `false` by default when not passed. Just build the core library: ```bash npm run build:custom ``` The custom build will be saved to `dist/flexsearch.custom.xxxx.min.js` or when format is module to `dist/flexsearch.custom.module.xxxx.min.js` (the "xxxx" is a hash based on the used build flags). ### Supported Build Flags
Flag Values Info

Feature Flags
SUPPORT_WORKER true, false
SUPPORT_ENCODER true, false
SUPPORT_CHARSET true, false
SUPPORT_CACHE true, false
SUPPORT_ASYNC true, false Asynchronous Rendering (support Promises)
SUPPORT_STORE true, false
SUPPORT_SUGGESTION true, false
SUPPORT_SERIALIZE true, false
SUPPORT_DOCUMENT true, false
SUPPORT_TAGS true, false
SUPPORT_PERSISTENT true, false
SUPPORT_KEYSTORE true, false
SUPPORT_COMPRESSION true, false
SUPPORT_RESOLVER true, false

Compiler Flags
DEBUG true, false Output debug information to the console (default: false)
RELEASE




custom
custom.module
bundle
bundle.module
es5
light
compact
POLYFILL true, false Include Polyfills (based on LANGUAGE_OUT)
PROFILER true, false Just used for automatic performance tests
LANGUAGE_OUT










ECMASCRIPT3
ECMASCRIPT5
ECMASCRIPT_2015
ECMASCRIPT_2016
ECMASCRIPT_2017
ECMASCRIPT_2018
ECMASCRIPT_2019
ECMASCRIPT_2020
ECMASCRIPT_2021
ECMASCRIPT_2022
ECMASCRIPT_NEXT
STABLE
Target language