fix(vercel): add missing node segment

This commit is contained in:
Pooya Parsa 2020-11-10 20:24:05 +01:00
parent c7b88defa4
commit a6c4a7e2cd

View File

@ -5,7 +5,7 @@ import { node } from './node'
export const vercel: SLSTarget = extendTarget(node, { export const vercel: SLSTarget = extendTarget(node, {
targetDir: '{{ rootDir }}/.vercel_build_output', targetDir: '{{ rootDir }}/.vercel_build_output',
outName: 'functions/_nuxt/index.js', outName: 'functions/node/_nuxt/index.js',
publicDir: '{{ targetDir }}/static', publicDir: '{{ targetDir }}/static',
inlineChunks: false, inlineChunks: false,
generateIgnore: [ generateIgnore: [
@ -13,12 +13,12 @@ export const vercel: SLSTarget = extendTarget(node, {
], ],
hooks: { hooks: {
async done ({ targetDir }) { async done ({ targetDir }) {
await wrtieRoutes({ targetDir }) await writeRoutes({ targetDir })
} }
} }
}) })
async function wrtieRoutes ({ targetDir }) { async function writeRoutes ({ targetDir }) {
const routes = [ const routes = [
{ {
src: '/sw.js', src: '/sw.js',