diff --git a/.changeset/spotty-gifts-complain.md b/.changeset/spotty-gifts-complain.md new file mode 100644 index 0000000..761313c --- /dev/null +++ b/.changeset/spotty-gifts-complain.md @@ -0,0 +1,5 @@ +--- +'@hono/vite-dev-server': patch +--- + +Remove miniflare from deps, and add it to peer optional. diff --git a/packages/dev-server/README.md b/packages/dev-server/README.md index 19a7a82..38463b0 100644 --- a/packages/dev-server/README.md +++ b/packages/dev-server/README.md @@ -167,6 +167,12 @@ You can pass the `env` value of a specified environment to the application. You can pass the Bindings specified in `wrangler.toml` to your application by using "Cloudflare Adapter". +Install miniflare and wrangler to develop and deploy your cf project. + +```text +npm i -D wrangler miniflare +``` + ```ts import devServer from '@hono/vite-dev-server' import cloudflareAdapter from '@hono/vite-dev-server/cloudflare' diff --git a/packages/dev-server/package.json b/packages/dev-server/package.json index 22ce3c7..b1e7124 100644 --- a/packages/dev-server/package.json +++ b/packages/dev-server/package.json @@ -60,6 +60,7 @@ "@playwright/test": "^1.37.1", "glob": "^10.3.10", "hono": "^4.4.11", + "miniflare": "^3.20240701.0", "playwright": "^1.39.0", "publint": "^0.2.5", "rimraf": "^5.0.1", @@ -69,14 +70,26 @@ "wrangler": "^3.63.1" }, "peerDependencies": { - "hono": "*" + "hono": "*", + "miniflare": "*", + "wrangler": "*" + }, + "peerDependenciesMeta": { + "hono": { + "optional": false + }, + "miniflare": { + "optional": true + }, + "wrangler": { + "optional": true + } }, "engines": { "node": ">=18.14.1" }, "dependencies": { "@hono/node-server": "^1.12.0", - "miniflare": "^3.20240701.0", "minimatch": "^9.0.3" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index f6cfb3f..0bf1054 100644 --- a/yarn.lock +++ b/yarn.lock @@ -942,6 +942,15 @@ __metadata: wrangler: ^3.63.1 peerDependencies: hono: "*" + miniflare: "*" + wrangler: "*" + peerDependenciesMeta: + hono: + optional: false + miniflare: + optional: true + wrangler: + optional: true languageName: unknown linkType: soft