Skip to content

Instantly share code, notes, and snippets.

@fredriccliver
Created September 14, 2020 06:01
Show Gist options
  • Save fredriccliver/3c3d1fa559fdc4ccd02889fc379b4e40 to your computer and use it in GitHub Desktop.
Save fredriccliver/3c3d1fa559fdc4ccd02889fc379b4e40 to your computer and use it in GitHub Desktop.
const path = require("path")
module.exports = {
mode: "development",
watch: true,
devtool: "eval-source-map",
entry: {
index: "./src/index.ts",
contact: "./src/contact.ts"
},
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
include: [path.resolve(__dirname, "src")],
},
],
},
resolve: {
extensions: [".ts", ".js"],
},
output: {
publicPath: "public/lib",
filename: "[name].bundle.js",
path: path.resolve(__dirname, "public/lib"),
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment