@hono/vite-build 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @hono/vite-build
2
2
 
3
+ ## 1.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#376](https://github.com/honojs/vite-plugins/pull/376) [`0dbad49495c243f0e296db3da710b29ea1d59a39`](https://github.com/honojs/vite-plugins/commit/0dbad49495c243f0e296db3da710b29ea1d59a39) Thanks [@hono-kun](https://github.com/apps/hono-kun)! - feat(build): use `@hono/bun` and `@hono/netlify` in the Bun and Netlify Functions adapters
8
+
9
+ The built entry imports `serveStatic` from `@hono/bun` and `handle` from `@hono/netlify` instead of `hono/bun` and `hono/netlify`, which are removed in Hono v5. Install the package for your adapter. Both packages work with `hono` 4.13.9 or later.
10
+
3
11
  ## 1.11.0
4
12
 
5
13
  ### Minor Changes
package/README.md CHANGED
@@ -28,6 +28,12 @@ Or you can install them with Bun.
28
28
  bun add -D vite @hono/vite-build
29
29
  ```
30
30
 
31
+ The Bun adapter and the Netlify Functions adapter import from `@hono/bun` and `@hono/netlify`. Install the one for your adapter.
32
+
33
+ ```bash
34
+ bun add @hono/bun
35
+ ```
36
+
31
37
  ### Settings
32
38
 
33
39
  Add `"type": "module"` to your package.json. Then, create `vite.config.ts` and edit it. The following is for Bun.
@@ -28,7 +28,7 @@ const bunBuildPlugin = (pluginOptions) => {
28
28
  ...buildPlugin({
29
29
  ssrTarget: "node",
30
30
  entryContentBeforeHooks: [async (appName, options) => {
31
- let code = "import { serveStatic } from 'hono/bun'\n";
31
+ let code = "import { serveStatic } from '@hono/bun'\n";
32
32
  code += serveStaticHook(appName, {
33
33
  filePaths: options?.staticPaths,
34
34
  root: pluginOptions?.staticRoot
@@ -4,7 +4,7 @@ function netlifyFunctionsBuildPlugin(pluginOptions) {
4
4
  return {
5
5
  ...buildPlugin({
6
6
  ssrTarget: "node",
7
- entryContentBeforeHooks: [() => "import { handle } from \"hono/netlify\""],
7
+ entryContentBeforeHooks: [() => "import { handle } from \"@hono/netlify\""],
8
8
  entryContentAfterHooks: [() => "export const config = { path: \"/*\", preferStatic: true }"],
9
9
  entryContentDefaultExportHook: (appName) => `export default handle(${appName})`,
10
10
  ...pluginOptions
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hono/vite-build",
3
3
  "description": "Vite plugin to build your Hono app",
4
- "version": "1.11.1",
4
+ "version": "1.12.0",
5
5
  "types": "dist/index.d.mts",
6
6
  "module": "dist/index.mjs",
7
7
  "type": "module",
@@ -65,9 +65,11 @@
65
65
  "vite-plugin"
66
66
  ],
67
67
  "devDependencies": {
68
+ "@hono/bun": "^1.0.1",
69
+ "@hono/netlify": "^1.0.2",
68
70
  "@hono/node-server": "^1.19.11",
69
71
  "@types/node": "^24.10.0",
70
- "hono": "^4.6.12",
72
+ "hono": "^4.13.9",
71
73
  "vite": "^6.1.1",
72
74
  "vitest": "^2.1.1"
73
75
  },