Dan Van Brunt
04/12/2022, 12:53 PMesBuildConfig.define
supposed to replace as a string?
With this…
const viewerRequest = new sst.Function(this, 'FunctionViewerRequest', {
handler: 'src/viewer-request.handler',
...defaultOptions,
memorySize: 128,
timeout: cdk.Duration.seconds(5),
bundle: {
esbuildConfig: {
define: {
'process.env.PRERENDER_TOKEN': 'NOT_TELLING',
},
},
},
})
… and this in the function…
const PRERENDER_TOKEN = process.env.PRERENDER_TOKEN
…I’m getting the error…
"errorMessage":"NOT_TELLING is not defined"
Which makes it look like the replacement isn’t replacing as a string? ""
Dan Van Brunt
04/12/2022, 12:54 PMthdxr
04/12/2022, 12:55 PMthdxr
04/12/2022, 12:55 PMDan Van Brunt
04/12/2022, 12:56 PMthdxr
04/12/2022, 12:56 PMDan Van Brunt
04/12/2022, 12:56 PMDan Van Brunt
04/12/2022, 12:56 PMthdxr
04/12/2022, 12:57 PM