forked from lukeautry/tsoa-example
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.js
40 lines (39 loc) · 1.07 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var path = require('path');
var webpack = require('webpack');
var nodeExternals = require('webpack-node-externals');
var _ = require('lodash');
const slsw = require('serverless-webpack');
module.exports = {
entry: _.assign({
addlIncludes: './addlIncludes.ts'
}, slsw.lib.entries),
target: 'node',
mode: 'development',
devtool: 'source-map',
module: {
rules: [
{ test: /\.ts(x?)$/, loader: 'ts-loader' }
],
},
resolve: {
extensions: ['.ts', '.js', '.tsx', '.jsx', '.json']
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
devtoolModuleFilenameTemplate: '[absolute-resource-path]'
},
externals: [nodeExternals()],
plugins: [
new webpack.IgnorePlugin(/\.(css|less)$/),
new webpack.BannerPlugin({ banner: 'require("reflect-metadata");', raw: true, entryOnly: false }),
new webpack.BannerPlugin({ banner: 'require("source-map-support").install();', raw: true, entryOnly: false })
],
optimization: {
minimize: false
},
performance: {
hints: false
}
};