Explanation of Different Builds
In the dist/ directory of the npm package you will find many different builds of Fuse.js. Here's an overview of the difference between them.
| UMD | CommonJS | ES Module (for bundlers) | |
|---|---|---|---|
| Full | fuse.js | fuse.cjs | fuse.mjs |
| Basic | fuse.basic.js | fuse.basic.cjs | fuse.basic.mjs |
| Full (Production) | fuse.min.js | - | fuse.min.mjs |
| Basic (Production) | fuse.basic.min.js | - | fuse.basic.min.mjs |
Terms
Full: Builds that contain standard fuzzy searching, extended searching, and logical query operations. These builds are larger.
Basic: Builds that contain only standard fuzzy searching.
UMD: UMD builds can be used directly in the browser via a
<script>tag. The default file from jsDelivr CDN at https://cdn.jsdelivr.net/npm/fuse.js is the UMD build (fuse.js).CommonJS: CommonJS builds are intended for use with older bundlers like browserify or webpack 1. The file for these bundlers (
pkg.main) is the CommonJS build (fuse.cjs).ES Module: Intended for use with modern bundlers like Webpack 2 or Rollup. The file for these bundlers (
pkg.module) is the ES Module build (fuse.mjs).
Donate
