Skip to content

Commit

Permalink
fix(vercel): update output config
Browse files Browse the repository at this point in the history
missed from #336
  • Loading branch information
pi0 committed Jul 12, 2022
1 parent 9ac4be2 commit daecb91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ Temporary Items
.build-*
.env
.netlify
.vercel
10 changes: 8 additions & 2 deletions src/presets/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ import { writeFile } from '../utils'
import { defineNitroPreset } from '../preset'
import type { Nitro } from '../types'

// https://vercel.com/docs/build-output-api/v3

export const vercel = defineNitroPreset({
extends: 'node',
entry: '#internal/nitro/entries/vercel',
output: {
dir: '{{ rootDir }}/.vercel_build_output',
serverDir: '{{ output.dir }}/functions/node/server',
dir: '{{ rootDir }}/.vercel/output',
serverDir: '{{ output.dir }}/functions/index.func',
publicDir: '{{ output.dir }}/static'
},
commands: {
deploy: '',
preview: ''
},
hooks: {
async 'compiled' (nitro: Nitro) {
const buildConfigPath = resolve(nitro.options.output.dir, 'config.json')
Expand Down

0 comments on commit daecb91

Please sign in to comment.