4.6.2
- updated esbuild
with 0.19.0 esbuild shipped a bug which changed the behaviour of tsconfig baseURL - updated body-parser
now Router body-parser plugin parsesform-urlencoded
requests correctly out of box - added a quick-start project example
with the help of npx and degit you can now start a new project whitin seconds - introduce
LOCAL
label to remove chunk of code when deploying
It's now possible to execute a chunk of code only when developing locally withLOCAL
label statement. Previously it was possible by checkingIS_LOCAL
value fromprocess.env
or with some additional esbuild configuration, example:
export const handler = async (event)=> {
if (process.env.IS_LOCAL == "true") {
console.log("do something locally")
}
return {
statusCode: 200,
body: "Hello World!"
}
}
now you can also achieve the same thing with a more elegant and less error prone with LOCAL label solution:
export const handler = async (event)=> {
LOCAL: {
console.log("do something locally")
}
return {
statusCode: 200,
body: "Hello World!"
}
}