Skip to content
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

New bundler setup with react-hot-toast/headless #205

Merged
merged 22 commits into from
Jul 12, 2022
Merged

New bundler setup with react-hot-toast/headless #205

merged 22 commits into from
Jul 12, 2022

Conversation

timolins
Copy link
Owner

@timolins timolins commented Jul 10, 2022

This PR improves the build & bundle setup. It's using tsup (powered by esbuild) instead of unmaintained tsdx. Additionaly, npm v4 was replaced by pnpm, which finally gets rid of the outdated v1 npm lockfile.

Faster builds

These changes give us a way faster and simpler builds (about 3x faster) with fewer dev dependencies.

Better headless support

The new bundler allows us to have multiple entry points. We use this to expose react-hot-toast/headless, which doesn't import any of the default components and has no dependency on goober.

This makes react-hot-toast headless mode compatible with react-native (and other non-web targets) again. Fixes #39

Using react-hot-toast/headless is super lightweight. Adding less than 2kb to your gzipped bundle.

@vercel
Copy link

vercel bot commented Jul 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-hot-toast ✅ Ready (Inspect) Visit Preview Jul 10, 2022 at 2:44PM (UTC)

@github-actions
Copy link

github-actions bot commented Jul 10, 2022

size-limit report 📦

Path Size
dist/react-hot-toast.cjs.production.min.js 0 B (-100% 🔽)
dist/react-hot-toast.esm.js 0 B (-100% 🔽)
dist/index.js 4.83 KB (+100% 🔺)
dist/index.mjs 4.52 KB (+100% 🔺)
headless/index.js 1.76 KB (+100% 🔺)
headless/index.mjs 1.47 KB (+100% 🔺)

* Add `remark-gfm`
@timolins timolins merged commit 2fb2010 into main Jul 12, 2022
@timolins timolins deleted the new-bundler branch July 12, 2022 19:53
kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this pull request Sep 1, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [react-hot-toast](https://togithub.com/timolins/react-hot-toast) | dependencies | minor | [`2.1.1` -> `2.3.0`](https://renovatebot.com/diffs/npm/react-hot-toast/2.1.1/2.3.0) |

---

### Release Notes

<details>
<summary>timolins/react-hot-toast</summary>

### [`v2.3.0`](https://togithub.com/timolins/react-hot-toast/releases/tag/v2.3.0)

[Compare Source](https://togithub.com/timolins/react-hot-toast/compare/v2.2.0...v2.3.0)

#### Better bundle setup

This release focuses on build and bundle improvements (faster, lighter & better).

-   Expose `react-hot-toast/headless` - for headless environments like react-native
-   Bundle is now 15% (5% gzipped) smaller
-   Bonus: 3x faster dev builds

##### What's Changed

-   Improve dev setup (`pnpm`, update deps) by [@&#8203;timolins](https://togithub.com/timolins) in [timolins/react-hot-toast#203
-   New bundler setup (tsup instead of tsdx) with `react-hot-toast/headless` by [@&#8203;timolins](https://togithub.com/timolins) in [timolins/react-hot-toast#205
-   Website Example: Make snippet consistent with action by [@&#8203;diksown](https://togithub.com/diksown) in [timolins/react-hot-toast#196
-   Docs: update version 2 page custom render api code example  by [@&#8203;AnishDe12020](https://togithub.com/AnishDe12020) in [timolins/react-hot-toast#175
-   fix: csstype peer dep by [@&#8203;eeston](https://togithub.com/eeston) in [timolins/react-hot-toast#183
-   Site Docs: 'one' => 'once' :) by [@&#8203;cbserra](https://togithub.com/cbserra) in [timolins/react-hot-toast#201
-   Website Example: Make snippet consistent with action by [@&#8203;diksown](https://togithub.com/diksown) in [timolins/react-hot-toast#196

##### New Contributors

-   [@&#8203;AnishDe12020](https://togithub.com/AnishDe12020) made their first contribution in [timolins/react-hot-toast#175
-   [@&#8203;eeston](https://togithub.com/eeston) made their first contribution in [timolins/react-hot-toast#183
-   [@&#8203;cbserra](https://togithub.com/cbserra) made their first contribution in [timolins/react-hot-toast#201
-   [@&#8203;diksown](https://togithub.com/diksown) made their first contribution in [timolins/react-hot-toast#196

**Full Changelog**: timolins/react-hot-toast@v2.2.0...v2.3.0

### [`v2.2.0`](https://togithub.com/timolins/react-hot-toast/releases/tag/v2.2.0)

[Compare Source](https://togithub.com/timolins/react-hot-toast/compare/v2.1.1...v2.2.0)

##### Changes

-   Expose core types  [`70dbbb2`](https://togithub.com/timolins/react-hot-toast/commit/70dbbb2)
-   Update goober  [`1563b56`](https://togithub.com/timolins/react-hot-toast/commit/1563b56)
-   Preserve line breaks in toast body Closes [#&#8203;144](https://togithub.com/timolins/react-hot-toast/issues/144)  [`f981e45`](https://togithub.com/timolins/react-hot-toast/commit/f981e45)

##### Docs

-   Fix example in docs  [`09ded7f`](https://togithub.com/timolins/react-hot-toast/commit/09ded7f)
-   Fix typo  [`379cf3e`](https://togithub.com/timolins/react-hot-toast/commit/379cf3e)
-   Add missing import to example  [`fbb2612`](https://togithub.com/timolins/react-hot-toast/commit/fbb2612)
-   Fix typo in Toaster page  [`c93328a`](https://togithub.com/timolins/react-hot-toast/commit/c93328a)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODUuMyIsInVwZGF0ZWRJblZlciI6IjMyLjE4NS4zIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cant find variable document on React Native
1 participant