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