Skip to content

Commit

Permalink
Update docs for usage with ESM / ES6
Browse files Browse the repository at this point in the history
The existing docs show a relative path, not the actual npm module bundle path.

I believe this should be correct for ESM/ES6 type environments and will hopefully prevent confusion as found in #341 etc.
  • Loading branch information
danawoodman authored Jul 18, 2023
1 parent 1243fd8 commit 9c278a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,12 @@ There are 3 types of indexes:

The most of you probably need just one of them according to your scenario.

### ES6 Modules (Browser):
### ESM / ES6 Modules (Browser:

```js
import Index from "./index.js";
import Document from "./document.js";
import WorkerIndex from "./worker/index.js";
import Index from "flexsearch/dist/module";
import Worker from "flexsearch/dist/module/worker";
import Doc from "flexsearch/dist/module/document";

const index = new Index(options);
const document = new Document(options);
Expand Down

0 comments on commit 9c278a9

Please sign in to comment.