Skip to content

Commit

Permalink
Version Packages (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 29, 2025
1 parent 65e2f76 commit 78cc3cd
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 62 deletions.
61 changes: 0 additions & 61 deletions .changeset/tall-teachers-carry.md

This file was deleted.

62 changes: 62 additions & 0 deletions packages/build/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# @hono/vite-build

## 1.3.0

### Minor Changes

- [#218](https://github.com/honojs/vite-plugins/pull/218) [`65e2f768a26d0665aaa05f60abf36bb66a6b6fa9`](https://github.com/honojs/vite-plugins/commit/65e2f768a26d0665aaa05f60abf36bb66a6b6fa9) Thanks [@chadxz](https://github.com/chadxz)! - Added a new Netlify Functions build adapter.

This adapter can be imported from `@hono/vite-build/netlify-functions` and will
compile your Hono app to comply with the requirements of the Netlify Functions
runtime.

- The default export will have the `hono/netlify` adapter applied to it.
- A `config` object will be exported, setting the function path to `'/*'` and
`preferStatic` to `true`.

Please note, this is for the Netlify Functions runtime, not the Netlify Edge
Functions runtime.

Example:

```ts
// vite.config.ts
import { defineConfig } from 'vite'
import devServer from '@hono/vite-dev-server'
import build from '@hono/vite-build/netlify-functions'

export default defineConfig({
plugins: [
devServer({
entry: './src/index.ts',
}),
build({
entry: './src/index.ts',
output: 'functions/server/index.js',
}),
],
})
```

If you also have a `public/publish` directory for your assets that should be
published to the corresponding Netlify site, then after running a build, you
would end up with a directory structure like:

```
dist/
functions/
server/
index.js
publish/
robots.txt
....
```

then you can use a netlify.toml that looks like:

```toml
# https://ntl.fyi/file-based-build-config
[build]
command = "vite build"
functions = "dist/functions"
publish = "dist/publish"
```

## 1.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hono/vite-build",
"description": "Vite plugin to build your Hono app",
"version": "1.2.1",
"version": "1.3.0",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"type": "module",
Expand Down

0 comments on commit 78cc3cd

Please sign in to comment.