Skip to content

Commit

Permalink
feat: basic support for netlify_builder target (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
pi0 and danielroe committed Apr 8, 2021
1 parent ec5b9ab commit 4f90f95
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"dependencies": {
"@cloudflare/kv-asset-handler": "^0.1.1",
"@netlify/functions": "^0.4.1",
"@nuxt/devalue": "^1.2.5",
"@nuxt/kit": "^0.2.0",
"@nuxt/un": "^0.1.1",
Expand Down
5 changes: 5 additions & 0 deletions src/presets/netlify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ export const netlify: NitroPreset = extendPreset(lambda, {
'_redirects'
]
})

// eslint-disable-next-line
export const netlify_builder: NitroPreset = extendPreset(netlify, {
entry: '{{ _internal.runtimeDir }}/entries/netlify_builder'
})
6 changes: 6 additions & 0 deletions src/runtime/entries/netlify_builder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// @ts-ignore
import { builderFunction } from '@netlify/functions'
// @ts-ignore
import { handler as _handler } from '~runtime/entries/lambda'

export const handler = builderFunction(_handler)

0 comments on commit 4f90f95

Please sign in to comment.