You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
703 B

const webpack = require('webpack');
6 years ago
const path = require('path');
function resolve(p) {
return path.join(__dirname, '/../', p);
}
module.exports = {
target: 'node',
node: {
__dirname: false,
__filename: false,
},
context: resolve('./src'),
entry: './index',
devtool: 'inline-source-map',
output: {
filename: "server.js",
path: resolve('dist')
},
resolve: {
extensions: [".ts", ".js"]
},
plugins: [
new webpack.DefinePlugin({
__VERSION__: JSON.stringify(require(resolve('./package.json')).version)
})
],
6 years ago
module: {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
exclude: /node_modules/
}
]
}
}