@presta/adapter-netlify
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

@presta/adapter-netlify

Netlify deployment adapter plugin for Presta. It copies generated files to the paths specified in your local netlify.toml config, as well as handles rewriting URLs to Netlify functions paths e.g. /.netlify/functions.

Usage

Make sure you've got a netlify.toml config in your root directory. It should look something like this:

[build]
  command = 'npm run build'
  publish = 'build/static'
  functions = 'build/functions'

Then, update your Presta config:

import { createConfig } from 'presta'
import netlify from '@presta/adapter-netlify'

export default createConfig({
  plugins: [netlify()],
})

Bundle size limit

Netlify's default bundler sometimes outputs lambda ZIP archives that are over the 50MB limit imposed by AWS. To avoid this, you might want to try configuring Netlify to use esbuild as the bundler.

To do so, add this to your Netlify config:

[functions]
  node_bundler = 'esbuild'

License

MIT License © Front of House

Readme

Keywords

none

Package Sidebar

Install

npm i @presta/adapter-netlify

Weekly Downloads

291

Version

0.6.0

License

MIT

Unpacked Size

21.6 kB

Total Files

5

Last publish

Collaborators

  • estrattonbailey
  • nickbytes