@marko/run-adapter-netlify v3.0.0
Preview and deploy @marko/run apps to Netlify Functions/Edge Functions
Intallation
npm install @marko/run-adapter-netlify
Usage
For most applications, installing this adapter is all that is needed. Marko Run will automatically discover it and configure it to deploy to Netlify Functions.
Configuration
Netlify applications require a netlify.toml
to configure it. This example is a starting point for Marko Run apps deployed to Netlify Functions.
[build]
command = "marko-run build"
publish = "dist/public"
functions = "dist"
Edge Functions
This adapter can be configured to build for Netlify Edge Functions in the application's Vite config.
import { defineConfig } from "vite";
import marko from "@marko/run/vite";
import netlifyAdapter from "@marko/run-adapter-netlify";
export default defineConfig({
plugins: [
marko({
adapter: netlifyAdapter({ edge: true }),
}),
],
});
The netlify.toml will also need to specify the edge edge_functions
directory instead of functions
.
[build]
command = "marko-run build"
publish = "dist/public"
edge_functions = "dist"
7 months ago
7 months ago
7 months ago
5 months ago
6 months ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago