Helper for building AWS lambda function with Vite.
npm install vite-plugin-aws-lambdaHelper for building AWS lambda functions with Vite.
- Defaults library formats to ['es'].
- Defaults es formatted output filenames to .
- Externalizes all NodeJS internal modules.
- Zips the output directory.
The plugin should generally be last. A library entry point must be set, or the plugin will have no effect.
``ts
import lambda from 'vite-plugin-aws-lambda';
export default {
plugins: [lambda()],
build: {
lib: { entry: 'src/index.ts' },
},
};
`
- outFilename: The output filename for the Lambda function zip file.config.outDir
- Relative paths are resolved from the (not config.root).false
- Set to to disable zipping.../
- Default: quiet
- : Suppresses plugin log output.false`
- Default: