Skip to content

Commit

Permalink
fix(vercel-edge): properly set rollup options
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 13, 2022
1 parent caa804e commit ad5b735
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/presets/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export const vercelEdge = defineNitroPreset({
},
commands: {
deploy: '',
preview: 'npx edge-runtime ./functions/index.func/index.mjs --listen'
preview: ''
},
rollupConfig: {
output: {
format: 'module'
}
},
hooks: {
async 'compiled' (nitro: Nitro) {
Expand Down Expand Up @@ -98,12 +103,7 @@ export const vercelEdge = defineNitroPreset({
const functionConfigPath = resolve(nitro.options.output.serverDir, '.vc-config.json')
const functionConfig = {
runtime: 'edge',
entrypoint: 'index.mjs',
rollupConfig: {
output: {
format: 'module'
}
}
entrypoint: 'index.mjs'
}
await writeFile(functionConfigPath, JSON.stringify(functionConfig, null, 2))
}
Expand Down

0 comments on commit ad5b735

Please sign in to comment.