I am trying to use typescript with serverless applications and I ran in some issues like the serverless-typescript package had its last update a year ago. I also tryed to use it with serverless webback but i am running in some issues regarding the use of ORMS because webpack cannot load the modals properly (it can when i import the files but not a runtime). Does someone have any advice of how to devolop serverless applications with typescript or should I keep using just javascript?
Basically it doesn't matter either it is serverless application or not. What matters is your webpack config. Try using serverless-webpack plugin with proper webpack config for typescript compilation
serverless.yml webpack part example:
plugins:
- serverless-webpack
custom:
webpack:
webpackConfig: ./webpack.config.js
webpack.config.js example:
const path = require('path')
const slsw = require('serverless-webpack')
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: slsw.lib.entries,
target: 'node',
resolve: {
extensions: ['.mjs', '.ts', '.js', '.json', '.tsx']
},
output: {
libraryTarget: 'commonjs2',
path: path.join(__dirname, '.webpack'),
filename: '[name].js'
},
module: {
rules: [
{
oneOf: [
{
test: /\.(ts|js)$/,
exclude: [/node_modules/],
loader: 'ts-loader',
options: {
transpileOnly: true
}
}
]
}
]
}
}
You can adapt it to your needs, I've just shared a little piece of my config
error: selenium.common.exceptions.TimeoutException: Message:
jetpack compose not responding to keyboard input on emulator
Hexagon Grid CSS - All hexagons change size when each of them is clicked
How to render HTML pages as PNG/JPEG images with URL array using Javascript only?
Get count of items that matches a condition from mongo db in node js
“Duplicate entry” even though the column has UNIQUE constraint
Context: I have a rather large project which is a social media back endWe use MondoDB (w/ mongoose) and Express in JS
Please kindly advise if there is walk-around to redirect to new page when amp-form validation returns error? ie
I have a NodeJS server and I'd like to serve a local video, but I get an error when getting the link to the html page that says: The media could not be loaded, either because the server or network failed or because the format is not supported
I'm trying to dockerize a node-app, but for some reason when I start the app using: