This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/backend/webpack.config.js

29 lines
664 B
JavaScript
Raw Normal View History

const path = require("path");
2018-10-03 19:04:30 +00:00
module.exports = (env, mode) => {
const production = mode === "production";
return {
entry: "./src/main.ts",
devtool: production ? "source-map": "inline-source-map",
target: "node",
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/
}
]
},
resolve: {
2018-09-29 13:06:14 +00:00
extensions: [".ts", ".js"]
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist")
}
};
};