-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <55688616+flevi29@users.noreply.github.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
- Loading branch information
Showing
11 changed files
with
55 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
"@meilisearch/instant-meilisearch": minor | ||
--- | ||
|
||
- 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(/*...*/) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './client' | ||
export * from './types' | ||
export * as meilisearch from 'meilisearch' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters