You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1271: Re-export `meilisearch` package, and expose created `MeiliSearch` instance r=brunoocasali a=flevi29
# Pull Request
## Related issue
Fixes#1260
## What does this PR do?
- exposed created `MeiliSearch` instance
- re-exported all of `"meilisearch"` package
These improvements make it so that no separate `"meilisearch"` package
has to be installed in order to use its exports directly. This
way a single `MeiliSearch` instance can be re-used, and we can potentially
save on bundle size by avoiding a separate different version installation of
`"meilisearch"`.
```typescript
import { instantMeiliSearch, meilisearch } from '`@meilisearch/instant-meilisearch'`
// re-exported "meilisearch" ^
const {
meiliSearchInstance,
// ^ re-usable MeiliSearch instance
searchClient
} = instantMeiliSearch(/*...*/)
```
Co-authored-by: F. Levi <[email protected]>
Co-authored-by: Bruno Casali <[email protected]>
0 commit comments