Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for usage with ESM / ES6 #398

Merged
merged 2 commits into from
Jan 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Document from "flexsearch/dist/module/document";

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