Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #338 - Added support to skip rebuilding artifacts and just regenerate cloudformation content #484

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,25 @@ See [example folder](examples) for some example configurations.

### Options

| Option | Description | Default |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| Esbuild Options | This plugin can take almost any [Esbuild Javascript Build Option](https://esbuild.github.io/api/#build-api). | [Default Esbuild Options](#default-esbuild-options) |
| `concurrency` | The number of concurrent bundle operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `zipConcurrency` | The number of concurrent zip operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `disableIncremental` | Disables the use of esbuild `incremental` compilation. | `false` |
| `exclude` | An array of dependencies to exclude from the Lambda. This is passed to the esbuild `external` option. Set to `*` to disable packaging `node_modules` | `['aws-sdk']` |
| `installExtraArgs` | Optional arguments passed to npm or yarn for `external` dependency resolution. eg. `['--legacy-peer-deps']` for npm v7+ to use legacy `peerDependency` resolution behavior | `[]` |
| `keepOutputDirectory` | Keeps the `.esbuild` output folder. Useful for debugging. | `false` |
| `nativeZip` | Uses the system's `zip` executable to create archives. _NOTE_: This will produce non-deterministic archives which causes a Serverless deployment update on every deploy. | `false` |
| `outputBuildFolder` | The output folder for Esbuild builds within the work folder. You will also need to manually override the watch ignore config if used. | `'.build'` |
| `outputWorkFolder` | The output folder for this plugin where all the bundle preparation is done. You will also need to manually override the watch ignore config if used. | `'.esbuild'` |
| `outputFileExtension` | The file extension used for the bundled output file. This will override the esbuild `outExtension` option | `'.js'` |
| `packagePath` | Path to the `package.json` file for `external` dependency resolution. | `'./package.json'` |
| `packager` | Packager to use for `external` dependency resolution. Values: `npm`, `yarn`, `pnpm` | `'npm'` |
| `packagerOptions` | Extra options for packagers for `external` dependency resolution. | [Packager Options](#packager-options) |
| `watch` | Watch options for `serverless-offline`. | [Watch Options](#watch-options) |
| Option | Description | Default |
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| Esbuild Options | This plugin can take almost any [Esbuild Javascript Build Option](https://esbuild.github.io/api/#build-api). | [Default Esbuild Options](#default-esbuild-options) |
| `concurrency` | The number of concurrent bundle operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `zipConcurrency` | The number of concurrent zip operations to run at once. eg. `8`. _NOTE_: This can be memory intensive and could produce slower builds. | `Infinity` |
| `disableIncremental` | Disables the use of esbuild `incremental` compilation. | `false` |
| `exclude` | An array of dependencies to exclude from the Lambda. This is passed to the esbuild `external` option. Set to `*` to disable packaging `node_modules` | `['aws-sdk']` |
| `installExtraArgs` | Optional arguments passed to npm or yarn for `external` dependency resolution. eg. `['--legacy-peer-deps']` for npm v7+ to use legacy `peerDependency` resolution behavior | `[]` |
| `keepOutputDirectory` | Keeps the `.esbuild` output folder. Useful for debugging. | `false` |
| `nativeZip` | Uses the system's `zip` executable to create archives. _NOTE_: This will produce non-deterministic archives which causes a Serverless deployment update on every deploy. | `false` |
| `outputBuildFolder` | The output folder for Esbuild builds within the work folder. You will also need to manually override the watch ignore config if used. | `'.build'` |
| `outputWorkFolder` | The output folder for this plugin where all the bundle preparation is done. You will also need to manually override the watch ignore config if used. | `'.esbuild'` |
| `outputFileExtension` | The file extension used for the bundled output file. This will override the esbuild `outExtension` option | `'.js'` |
| `packagePath` | Path to the `package.json` file for `external` dependency resolution. | `'./package.json'` |
| `packager` | Packager to use for `external` dependency resolution. Values: `npm`, `yarn`, `pnpm` | `'npm'` |
| `packagerOptions` | Extra options for packagers for `external` dependency resolution. | [Packager Options](#packager-options) |
| `watch` | Watch options for `serverless-offline`. | [Watch Options](#watch-options) |
| `skipBuild` | Avoid rebuilding lambda artifacts in favor of reusing previous build artifacts. | `false` |
| `skipBuildExcludeFns` | An array of lambda names that will always be rebuilt if `skipBuild` is set to `true` and bundling individually. This is helpful for dynamically generated functions like serverless-plugin-warmup. | `[]` |

#### Default Esbuild Options

Expand Down
Loading