Created
February 8, 2021 12:56
-
-
Save JoeStead/ca3a98b1c45d0215869205a1bc118419 to your computer and use it in GitHub Desktop.
standard 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"); | |
module.exports = { | |
entry: "./src/lambda.ts", | |
mode: "production", | |
cache: true, | |
target: "node", | |
module: { | |
rules: [ | |
{ | |
test: /\.tsx?$/, | |
use: "ts-loader", | |
exclude: /node_modules/, | |
}, | |
{ | |
test: /\.m?js/, | |
resolve: { | |
fullySpecified: false, | |
}, | |
}, | |
], | |
}, | |
resolve: { | |
extensions: [".mjs", ".ts", ".js"], | |
modules: ["node_modules"], | |
}, | |
optimization: { | |
minimize: false, | |
}, | |
externals: {}, | |
output: { | |
libraryTarget: "commonjs", | |
filename: "lambda.js", | |
path: path.resolve(__dirname, "../../artifacts/my-thing"), | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment