1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-22 05:19:22 +00:00
comunicapiv2/webpack.config.js
2019-11-21 17:04:15 +01:00

32 lines
418 B
JavaScript

const path = require("path");
const {
NODE_ENV = 'production'
} = process.env;
module.exports = {
entry: './src/main.ts',
mode: NODE_ENV,
target: 'node',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'index.js'
},
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
use: [
'ts-loader'
]
}
]
},
watch: NODE_ENV === 'development'
}