-
-
Save zachleat/6f7176cf28f7d7d904936d47f8af7cc8 to your computer and use it in GitHub Desktop.
Eleventy Cache Re-use in Serverless mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { EleventyServerlessBundlerPlugin } = require("@11ty/eleventy"); | |
module.exports = function(eleventyConfig) { | |
let options = { | |
copy: [ | |
".cache/", | |
], | |
copyOptions: { | |
filter: function(path) { | |
return !path.endsWith(".jpg") && | |
!path.endsWith(".jpeg") && | |
!path.endsWith(".webp") && | |
!path.endsWith(".mp4") && | |
!path.endsWith(".gif") && | |
!path.endsWith(".png"); | |
} | |
} | |
}; | |
eleventyConfig.addPlugin(EleventyServerlessBundlerPlugin, Object.assign({ | |
name: "preview", | |
redirects: "netlify-toml-functions", | |
}, options)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment