Setup eleventy serverless

This commit is contained in:
Sam Carlton 2021-07-24 13:31:28 -05:00
parent 6b2a827a11
commit f839b829f4
5 changed files with 109 additions and 81 deletions

View file

@ -33,6 +33,8 @@ import { transformSync } from 'esbuild'
import nuxtConfig from './nuxt.config'
const { EleventyServerlessBundlerPlugin } = require("@11ty/eleventy");
// Setup dotenv
dotenv.config()
@ -173,6 +175,11 @@ module.exports = function ( eleventyConfig ) {
})
eleventyConfig.addPlugin(EleventyServerlessBundlerPlugin, {
name: "eleventy-builder", // The serverless function name from your permalink object
functionsDir: "./netlify/functions/",
})
return {
// https://www.11ty.dev/docs/config/#template-formats