-
Notifications
You must be signed in to change notification settings - Fork 27
/
webpack.config.js
36 lines (35 loc) · 1.04 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
const nodeExternals = require('webpack-node-externals');
const path = require('path');
module.exports = {
target: 'node',
externals: [nodeExternals()],
entry: {
authorizerGithub: ['./bootstrap', './src/authorizers/github.js'],
put: ['./bootstrap', './src/put/index.js'],
get: ['./bootstrap', './src/get/index.js'],
distTagsGet: ['./bootstrap', './src/dist-tags/get.js'],
distTagsPut: ['./bootstrap', './src/dist-tags/put.js'],
distTagsDelete: ['./bootstrap', './src/dist-tags/delete.js'],
userPut: ['./bootstrap', './src/user/put.js'],
userDelete: ['./bootstrap', './src/user/delete.js'],
whoamiGet: ['./bootstrap', './src/whoami/get.js'],
tarGet: ['./bootstrap', './src/tar/get.js'],
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
include: /src/,
exclude: /node_modules/,
},
{
test: /\.json$/,
loader: 'json-loader',
}],
},
};