Compatibility Helpers
Typed config shims for popular community plugins during migration.
Overview
The compat module provides typed configuration helpers for popular community plugins. Use these as a bridge while you migrate to native @interlace plugins.
import { defineConfig, compat } from '@interlace/serverless-devkit';
export default defineConfig({
service: 'my-api',
provider: { name: 'aws', runtime: 'nodejs20.x' },
custom: {
// Typed — catches typos and invalid values
...compat.apiGatewayCaching({
enabled: true,
clusterSize: '0.5',
ttlInSeconds: 300,
}),
...compat.domainManager({
domainName: 'api.example.com',
basePath: '',
}),
...compat.prune({
automatic: true,
number: 3,
}),
},
});Available Helpers
| Helper | Community Plugin | Status |
|---|---|---|
compat.apiGatewayCaching() | serverless-api-gateway-caching | Migrate to @interlace/serverless-api-gateway-caching |
compat.domainManager() | serverless-domain-manager | Compat only |
compat.prune() | serverless-prune-plugin | Compat only |
Migration Path
Once you're ready to switch to the native @interlace plugin:
- Replace
compat.apiGatewayCaching()withinterlaceCachingconfig - Swap the plugin in your
pluginsarray - See the migration guide for details