-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwebpack.ts
42 lines (39 loc) · 991 Bytes
/
webpack.ts
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
41
42
import path from 'path';
import {Configuration} from 'webpack';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
const configuration: Configuration = {
entry: {
app: path.resolve('src/app.ts'),
authorizer: path.resolve('src/authorizer.ts'),
import: path.resolve('src/import.ts'),
vote: path.resolve('src/vote.ts'),
},
resolve: {
extensions: [
'.ts',
'.js',
],
},
output: {
path: path.resolve('dist'),
filename: '[name].js',
libraryTarget: 'commonjs2'
},
target: 'node',
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
transpileOnly: true,
},
},
],
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
],
};
export default configuration;