Created
June 6, 2021 09:19
-
-
Save harshq/df1e25b12de12365d03da5c18d754480 to your computer and use it in GitHub Desktop.
serverless-webpack config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const slsw = require('serverless-webpack'); | |
module.exports = { | |
mode: slsw.lib.webpack.isLocal ? 'development' : 'production', | |
entry: slsw.lib.entries, | |
stats: 'summary', | |
resolve: { | |
extensions: ['.ts'], | |
}, | |
target: 'node', | |
module: { | |
rules: [ | |
{ | |
test: /\.(ts?)$/, | |
loader: 'ts-loader', | |
exclude: [ | |
[ | |
path.resolve(__dirname, 'node_modules'), | |
path.resolve(__dirname, '.serverless'), | |
path.resolve(__dirname, '.webpack'), | |
], | |
], | |
}, | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment