Skip to content
Draft
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
5 changes: 5 additions & 0 deletions packages/service-bundler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Centralised script for bundling and zipping service artifacts for deployment.

JavaScript is emitted as a single entry bundle per function and API proxy. This
keeps Lambda artifacts self-contained and avoids runtime JavaScript chunk loading.
Native `.node` assets, source maps, and files supplied through `copyFiles` are
still emitted separately when required.

### Pre-requisites

- Node.js (Please see `.nvmrc` for specific version)
Expand Down
6 changes: 6 additions & 0 deletions packages/service-bundler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ export class ServicePackager {
mode: 'production',
optimization: {
minimize: true,
// Lambda handlers are deployed and loaded as self-contained artifacts.
// Keep the JavaScript graph in the entry chunk so the zip does not need
// Rspack's runtime chunk loader to resolve additional JS files.
splitChunks: false,
runtimeChunk: false,
},
ignoreWarnings: [
{
Expand All @@ -108,6 +113,7 @@ export class ServicePackager {
externals: ['@babel/core', /^@babel\//],
output: {
module: true,
asyncChunks: false,
},
module: {
rules: [
Expand Down