1 | const path = require('path');
|
2 | const nodeExternals = require('webpack-node-externals');
|
3 |
|
4 | module.exports = {
|
5 | entry: {
|
6 | pkt: './src/pkt/index.ts',
|
7 | pkctl: './src/pkctl/index.ts',
|
8 | ['pk-lib']: './src/pk-lib/index.ts',
|
9 | },
|
10 |
|
11 | target: 'node',
|
12 | module: {
|
13 | rules: [
|
14 | {
|
15 | test: /\.ts$/,
|
16 | use: 'ts-loader',
|
17 | exclude: [/node_modules/]
|
18 | }
|
19 | ]
|
20 | },
|
21 | resolve: {
|
22 | extensions: ['.ts', '.js']
|
23 | },
|
24 | output: {
|
25 | filename: '[name].js',
|
26 | path: path.resolve(__dirname, 'dist')
|
27 | },
|
28 | externals: [nodeExternals()],
|
29 | };
|