Noah D
11/01/2021, 7:06 AMSyntaxError: Unexpected token 'export'
which leads me to believe my code is being interpreted as typescript instead of javascript when it is uploaded to AWS. I am largely following the setup described in this repo but attempting to have separate workspaces for each service/core lib. I might just be overcomplicating this and should be resorting back to just having the whole backend folder as a workspace, but if I can get it working that would be cool. My current tsconfig for the services is in screenshot #1. And my base tsconfig file is in screenshot #2. Any thoughts/resources on this would be helpful. Been trawling through the ts handbook, but no luck so far 😅Pavan Kumar
11/15/2021, 6:12 PMlearna-yarn-starter
code for serverless and SST I see difference in example.
For serverless
, in the following example. The import/export
works perfectly. Sample workspace
package is getting transpiled properly
export default function sample() {
return "sample package";
}
While for SST
, the example uses module.exports
if I change it to export
default
*function* sample()
, SST will throw error SyntaxError: Unexpected token 'export'
module.exports = function sample() {
return "sample package";
}
Question is:
1. What is so special about serverless
framework which makes it to transpile
the imported workspace
package.
2. Can we do the same with SST, so that it transpiles the imported workspace
package?