Skip to content

Instantly share code, notes, and snippets.

@JoeStead
Created February 8, 2021 12:56
Show Gist options
  • Save JoeStead/ca3a98b1c45d0215869205a1bc118419 to your computer and use it in GitHub Desktop.
Save JoeStead/ca3a98b1c45d0215869205a1bc118419 to your computer and use it in GitHub Desktop.
standard webpack config
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