Added server build mode for webpack

This commit is contained in:
hydrant
2019-03-12 16:01:46 +01:00
parent 25037479e0
commit 6fdbad45d1
4 changed files with 42 additions and 7 deletions

View File

@@ -0,0 +1,30 @@
const path = require('path');
module.exports = {
mode: 'production',
entry: './index.ts',
output: {
path: path.resolve(__dirname),
filename: 'index.js'
},
module: {
rules: [
{
test: /\.js$/,
use: { loader: 'babel-loader' }
},
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
options: {
allowTsInNodeModules: true
}
}
}
]
},
resolve: {
extensions: ['.ts', '.js', '.json']
}
};