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
2018-09-21 16:27:25 +02:00

33 lines
786 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"],
alias: {
shared: path.join(__dirname, "../shared/")
}
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist")
}
};
};