Skip to content

Releases: honojs/vite-plugins

@hono/[email protected]

29 Jan 09:31
78cc3cd
Compare
Choose a tag to compare

Minor Changes

  • #218 65e2f768a26d0665aaa05f60abf36bb66a6b6fa9 Thanks @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:

    // 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:

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

@hono/[email protected]

16 Jan 07:15
4894ad5
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

09 Jan 07:52
e7d3a11
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

05 Jan 12:51
2179833
Compare
Choose a tag to compare

Minor Changes

@hono/[email protected]

03 Jan 09:30
90e95be
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

15 Dec 09:20
5e0e7fa
Compare
Choose a tag to compare

Minor Changes

@hono/[email protected]

05 Dec 09:41
57ecab3
Compare
Choose a tag to compare

Patch Changes

@hono/[email protected]

11 Nov 08:50
6152be1
Compare
Choose a tag to compare

Minor Changes

@hono/[email protected]

15 Sep 07:24
ae89388
Compare
Choose a tag to compare

@hono/[email protected]

15 Sep 01:11
344f370
Compare
Choose a tag to compare