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
Alexander Polynomdivision fdaa9cb8f3 feat: Remove shared/
2018-09-29 15:06:14 +02:00

30 lines
691 B
JavaScript

const path = require("path");
module.exports = env => {
const production = env.NODE_ENV || "production";
return {
entry: "./src/main.ts",
devtool: production ? "source-map": "inline-source-map",
target: "node",
mode: env.NODE_ENV,
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/
}
]
},
resolve: {
extensions: [".ts", ".js"]
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist")
}
};
};