-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: Remove UMD build output #5517
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
40fdcf9
Add ESM.sh setup instructions
lachlancollins 1355b3c
Add link to react docs
lachlancollins 0a1a7ad
Merge branch 'alpha' into remove-umd
lachlancollins 05473f9
Merge branch 'alpha' into remove-umd
lachlancollins 53775b6
Fix eslint warnings
lachlancollins c9e01ec
Remove reference to unpkg
lachlancollins 04a489a
Simplify changedPackages logic
lachlancollins e865921
Merge branch 'alpha' into remove-umd
lachlancollins 5def058
Merge branch 'alpha' into remove-umd
lachlancollins 9f4d913
Merge branch 'alpha' into remove-umd
lachlancollins 8474281
Merge branch 'alpha' into remove-umd
lachlancollins e93d4b0
Remove umd from rollup
lachlancollins 0497b60
Remove other refs to UMD
lachlancollins dbb0c74
Run prettier
lachlancollins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ id: installation | |
title: Installation | ||
--- | ||
|
||
You can install React Query via [NPM](https://npmjs.com), | ||
You can install React Query via [NPM](https://npmjs.com/), | ||
or a good ol' `<script>` via | ||
[unpkg.com](https://unpkg.com). | ||
[ESM.sh](https://esm.sh/). | ||
|
||
> v5 is currently in alpha. | ||
|
||
|
@@ -25,15 +25,17 @@ React Query is compatible with React v18+ and works with ReactDOM and React Nati | |
|
||
### CDN | ||
|
||
If you're not using a module bundler or package manager we also have a global ("UMD") build hosted on the [unpkg.com](https://unpkg.com) CDN. Simply add the following `<script>` tag to the bottom of your HTML file: | ||
If you're not using a module bundler or package manager, you can also use this library via an ESM-compatible CDN such as [ESM.sh](https://esm.sh/). Simply add a `<script type="module">` tag to the bottom of your HTML file: | ||
|
||
```html | ||
<script src="https://unpkg.com/@tanstack/react-query@alpha/build/umd/index.production.js"></script> | ||
<script type="module"> | ||
import React from 'https://esm.sh/[email protected]' | ||
import ReactDOM from 'https://esm.sh/[email protected]' | ||
import { QueryClient } from 'https://esm.sh/@tanstack/react-query@alpha' | ||
</script> | ||
``` | ||
|
||
Once you've added this you will have access to the `window.ReactQuery` object and its exports. | ||
|
||
> This installation/usage requires the [React CDN script bundles](https://reactjs.org/docs/cdn-links.html) to be on the page as well. | ||
> You can find instructions on how to use React without JSX [here](https://react.dev/reference/react/createElement#creating-an-element-without-jsx). | ||
|
||
### Requirements | ||
|
||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -35,7 +35,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
"sideEffects": false, | ||
"files": [ | ||
"build/lib/*", | ||
"build/umd/*", | ||
"src" | ||
], | ||
"scripts": { | ||
|
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 |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
"files": [ | ||
"build/esm/*", | ||
"build/cjs/*", | ||
"build/umd/*", | ||
"build/source/*", | ||
"build/types/*", | ||
"src" | ||
|
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the report we're getting is that helpful now:
from: https://cloud.nx.app/runs/llccfmKwnL