28 lines
581 B
JavaScript
28 lines
581 B
JavaScript
const path = require("path");
|
|
|
|
module.exports = {
|
|
entry: "./src/app.ts",
|
|
mode: process.env.NODE_ENV || "production",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
loader: "ts-loader",
|
|
},
|
|
],
|
|
},
|
|
devtool: "inline-source-map",
|
|
devServer: {
|
|
static: "./dist",
|
|
},
|
|
output: {
|
|
filename: "bundle.js",
|
|
path: path.resolve(__dirname, "dist"),
|
|
},
|
|
resolve: {
|
|
extensions: [ ".ts", ".js", ".json" ],
|
|
},
|
|
experiments: {
|
|
topLevelAwait: true,
|
|
},
|
|
};
|