-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid creating a core CJS bundle by re-using main bundle exports
These changes help avoid creating a CJS specific bundle for `@apollo/client/core` by comparing `dist/apollo-client.cjs.js` and `dist/react/index.js` exports, then re-exporting all non-React exports from the main CJS bundle.
- Loading branch information
Showing
6 changed files
with
71 additions
and
38 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 +1,2 @@ | ||
/* Core */ | ||
|
||
export * from './core'; | ||
|
||
/* React */ | ||
|
||
export { ApolloProvider } from './react/context/ApolloProvider'; | ||
export { ApolloConsumer } from './react/context/ApolloConsumer'; | ||
export { | ||
getApolloContext, | ||
resetApolloContext, | ||
ApolloContextValue | ||
} from './react/context/ApolloContext'; | ||
export { useQuery } from './react/hooks/useQuery'; | ||
export { useLazyQuery } from './react/hooks/useLazyQuery'; | ||
export { useMutation } from './react/hooks/useMutation'; | ||
export { useSubscription } from './react/hooks/useSubscription'; | ||
export { useApolloClient } from './react/hooks/useApolloClient'; | ||
export { RenderPromises } from './react/ssr/RenderPromises'; | ||
export * from './react/types/types'; | ||
export * from './react/parser/parser'; | ||
export * from './react'; |
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,21 @@ | ||
export { ApolloProvider } from './context/ApolloProvider'; | ||
export { ApolloConsumer } from './context/ApolloConsumer'; | ||
export { | ||
getApolloContext, | ||
resetApolloContext, | ||
ApolloContextValue | ||
} from './context/ApolloContext'; | ||
export { useQuery } from './hooks/useQuery'; | ||
export { useLazyQuery } from './hooks/useLazyQuery'; | ||
export { useMutation } from './hooks/useMutation'; | ||
export { useSubscription } from './hooks/useSubscription'; | ||
export { useApolloClient } from './hooks/useApolloClient'; | ||
export { RenderPromises } from './ssr/RenderPromises'; | ||
export { | ||
DocumentType, | ||
IDocumentDefinition, | ||
operationName, | ||
parser | ||
} from './parser/parser'; | ||
|
||
export * from './types/types'; |