-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: Replace rollup with tsup/esbuild #5597
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
73e2a59
Demo tsup v7
lachlancollins f87ea89
Use tsc to build d.ts
lachlancollins f27ff7b
Test tsup for react-query
lachlancollins 6fe8290
Update tsup target
lachlancollins c16aca7
Add config to eslint-plugin-query
lachlancollins cbe67a4
Remove legacy extension
lachlancollins be1f6e8
Target browsers
lachlancollins 3aa5b90
Merge branch 'alpha' into tsup
TkDodo 955dc9d
Merge branch 'alpha' into tsup
lachlancollins 631eb61
Merge branch 'alpha' into tsup
lachlancollins 91f2dae
Merge branch 'alpha' into tsup
lachlancollins 92a9067
Generate types with tsup
lachlancollins 07c56a8
Generate modern and legacy builds
lachlancollins 870ee13
Add tsup config helpers
lachlancollins 33209f3
Add bundle option to tsup config
lachlancollins 0e01945
Fix package.json build paths
lachlancollins 9c4f14b
Merge branch 'alpha' into tsup
TkDodo 3bb39f0
Merge branch 'alpha' into tsup
lachlancollins 3c6d1b3
Merge branch 'alpha' into tsup
lachlancollins f2fb747
Preserve optional chaining
lachlancollins 5aa6660
Merge branch 'alpha' into tsup
lachlancollins 0bc367a
Update supported browsers docs
lachlancollins 5311efd
Migrate some other packages
lachlancollins 3551d90
Convert vue-query
lachlancollins f1a87b7
Remove getRollupConfig.js
lachlancollins 5d89203
Merge branch 'alpha' into tsup
lachlancollins 62879e8
Fix forceEnv option
lachlancollins 2c8cd1d
Remove babel and browserslistrc
lachlancollins e59eaed
Alternate production export
lachlancollins 850d98e
Fix missing devtools in production
lachlancollins f4af223
Merge branch 'alpha' into tsup
lachlancollins d7f14d8
feat(solid-query & devtools): Use tsup (#1)
ardeora 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 hidden or 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 hidden or 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,13 +1,8 @@ | ||
| // @ts-check | ||
|
|
||
| import { defineConfig } from 'tsup' | ||
| import { legacyConfig } from '../../scripts/getTsupConfig.js' | ||
|
|
||
| export default defineConfig({ | ||
| entry: ['src/index.ts'], | ||
| format: ['cjs', 'esm'], | ||
| target: ['es2020', 'node16'], | ||
| outDir: 'build/lib', | ||
| dts: true, | ||
| sourcemap: true, | ||
| clean: true, | ||
| }) | ||
| export default defineConfig([ | ||
| legacyConfig({ entry: ['src/*.ts', 'src/*.tsx'], bundle: true }), | ||
| ]) |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,9 @@ | ||
| // @ts-check | ||
|
|
||
| import { defineConfig } from 'tsup' | ||
| import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js' | ||
|
|
||
| export default defineConfig([ | ||
| modernConfig({ entry: ['src/*.ts'], bundle: false }), | ||
| legacyConfig({ entry: ['src/*.ts'], bundle: false }), | ||
| ]) |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,9 @@ | ||
| // @ts-check | ||
|
|
||
| import { defineConfig } from 'tsup' | ||
| import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js' | ||
|
|
||
| export default defineConfig([ | ||
| modernConfig({ entry: ['src/*.ts', 'src/*.tsx'], bundle: false }), | ||
| legacyConfig({ entry: ['src/*.ts', 'src/*.tsx'], bundle: false }), | ||
| ]) |
This file contains hidden or 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,41 @@ | ||
| // @ts-check | ||
|
|
||
| /** | ||
| * @param {Object} opts - Options for building configurations. | ||
| * @param {string[]} opts.entry - The entry array. | ||
| * @param {boolean} opts.bundle - Whether to bundle the output. | ||
| * @returns {import('tsup').Options} | ||
| */ | ||
| export function modernConfig(opts) { | ||
| return { | ||
| entry: opts.entry, | ||
| format: ['cjs', 'esm'], | ||
| target: ['chrome84', 'firefox90', 'edge84', 'safari15', 'ios15', 'opera70'], | ||
| outDir: 'build/modern', | ||
lachlancollins marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| bundle: opts.bundle, | ||
| splitting: opts.bundle, | ||
| dts: true, | ||
| sourcemap: true, | ||
| clean: true, | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * @param {Object} opts - Options for building configurations. | ||
| * @param {string[]} opts.entry - The entry array. | ||
| * @param {boolean} opts.bundle - Whether to bundle the output. | ||
| * @returns {import('tsup').Options} | ||
| */ | ||
| export function legacyConfig(opts) { | ||
| return { | ||
| entry: opts.entry, | ||
| format: ['cjs', 'esm'], | ||
| target: ['es2020', 'node16'], | ||
| outDir: 'build/legacy', | ||
| bundle: opts.bundle, | ||
| splitting: opts.bundle, | ||
| dts: true, | ||
| sourcemap: true, | ||
| clean: true, | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.