Adrián Mouly
04/22/2022, 4:53 AMconsole.log(MyCoolClasss.name, 'start');
But we I get this in the logs:
Ea start
Adrián Mouly
04/22/2022, 4:54 AMLukasz K
04/22/2022, 5:05 AMAdrián Mouly
04/22/2022, 5:17 AMAdrián Mouly
04/22/2022, 5:17 AMLukasz K
04/22/2022, 6:32 AM"minify": false
in sst.jsonFrank
minify
for esbuild like this https://docs.serverless-stack.com/constructs/v1/Function#minify
Or I wonder if keepNames
works as well https://docs.serverless-stack.com/constructs/v1/Function#esbuildconfigkeepnamesAdrián Mouly
04/22/2022, 1:41 PMthdxr
04/22/2022, 3:05 PMpreserveNames
optionthdxr
04/22/2022, 3:05 PMAdam Fanello
04/22/2022, 3:17 PMkeepNames
should do the trick - preserves the class name
property for dependency injection, so would do so for simple logging as well.Adam Fanello
04/22/2022, 3:18 PM/*
* App-level configuration
*/
app.setDefaultFunctionProps({
runtime: "nodejs14.x",
architecture: Architecture.ARM_64,
logRetention: RetentionDays.ONE_MONTH,
memorySize: 256,
tracing: Tracing.DISABLED, // x-ray
bundle: {
esbuildConfig: {
keepNames: true, // preserve for @sailplane/injector
plugins: "./src/stacks/esbuild-plugins.js",
},
},
environment: {
NAMESPACE: app.logicalPrefixedName("").slice(0, -1),
NODE_OPTIONS: "--enable-source-maps",
},
});
Adam Fanello
04/22/2022, 3:19 PMthdxr
04/22/2022, 3:21 PMAdrián Mouly
04/22/2022, 4:45 PMAdrián Mouly
04/22/2022, 4:55 PMthdxr
04/22/2022, 4:55 PMAdrián Mouly
04/22/2022, 4:56 PMAdrián Mouly
04/22/2022, 4:56 PMthdxr
04/22/2022, 4:56 PMAdrián Mouly
04/22/2022, 4:56 PMAdrián Mouly
04/22/2022, 4:56 PMAdrián Mouly
04/22/2022, 4:57 PMAdrián Mouly
04/22/2022, 4:57 PMAdam Fanello
04/22/2022, 5:11 PMthdxr
04/22/2022, 5:12 PMthdxr
04/22/2022, 5:12 PMthdxr
04/22/2022, 5:12 PMthdxr
04/22/2022, 5:12 PMAdam Fanello
04/22/2022, 5:12 PMAdrián Mouly
04/22/2022, 5:13 PMAdam Fanello
04/22/2022, 5:13 PM