Skip to content

Add serverless template

Compare
Choose a tag to compare
@stoikerty stoikerty released this 14 Sep 12:54
· 6 commits to master since this release
eabe2ea

This update adds a serverless template with additional support for the existing programmatic usage. If something isn't quite right, you will also get helpful errors which point out how the file should be written (that it needs to be a promise).

You are now able to specify an entry point for preRendering like so:

// Example of programmatic usage of dev-toolkit with a serverless-type application
require('dev-toolkit').default({
  command: 'preRender',
  options: {
    // Use the function from the entry point instead of `preRender` from `src/server/index`
    preRenderEntryPoint: path.resolve(process.cwd(), 'src/server/preRender'),
    // silence any console logging
    silent: true,
  },
});