From 51ec2bb72e4c0d43109b94b4f456b61559acb9d8 Mon Sep 17 00:00:00 2001 From: Heb Date: Fri, 28 Jul 2023 15:57:44 +0700 Subject: [PATCH] docs: improve nightly release usage section (#468) Co-authored-by: Pooya Parsa --- README.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 31579ee7..44bd1ebd 100644 --- a/README.md +++ b/README.md @@ -41,21 +41,40 @@ pnpm add h3
Using Nightly Releases -You can try latest changes of h3 landing to the `main` branch by using [`h3-nightly`](https://www.npmjs.com/package/h3-nightly) package. - -You can directly swap from `h3` to `h3-nightly` for both dependency and imports, or use `resolutions` feature in `package.json` (recommanded): +If you are directly using `h3` as a dependency: ```json { "dependencies": { - "h3": "latest" - }, + "h3": "npm:h3-nightly@latest" + } +} +``` + +If you are using a framework ([Nuxt](https://nuxt.com/) or [Nitro](https://nitro.unjs.io/)) that is using `h3`: + +pnpm and yarn: + +```json +{ "resolutions": { "h3": "npm:h3-nightly@latest" } } ``` +npm: + +```json +{ + "overrides": { + "h3": "npm:h3-nightly@latest" + } +} +``` + +**Note:** Make sure to recreate lockfile and `node_modules` after reinstall to avoid hoisting issues. +
## Usage