-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
45 lines (39 loc) · 943 Bytes
/
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
41
42
43
44
45
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: path.resolve(__dirname, './src/index.ts'),
target: 'node',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
// needed for ./src folder to be considered as root
modules: [
path.join(__dirname, './src'),
path.join(__dirname, './node_modules'),
],
extensions: ['.tsx', '.ts', '.js'],
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'transcorder.js',
},
node: {
__dirname: false,
},
plugins: [
new CopyPlugin([
{ from: './src/streams.example.json', to: 'streams.example.json' },
{ from: './src/config.rpi.json', to: 'config.rpi.json' },
]),
],
// sourcempas
devtool: 'sourcemap',
};