-
Notifications
You must be signed in to change notification settings - Fork 45
/
webpack.config.js
52 lines (51 loc) · 1.28 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
41
42
43
44
45
46
47
48
49
50
51
52
const { join } = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
mode: 'production',
devtool: 'inline-source-map',
entry: {
contentscript: join(__dirname, 'src/salty.ts'),
background: join(__dirname, 'src/twitch_background.ts'),
popup: join(__dirname, 'src/popup.ts'),
config: join(__dirname, 'src/config.ts'),
matchdata: join(__dirname, 'src/matchdata.ts'),
chat: join(__dirname, 'src/twitch_content.ts')
},
output: {
path: join(__dirname, 'dist', 'js'),
filename: '[name].js',
},
module: {
rules: [
{
exclude: /node_modules/,
test: /\.ts?$/,
use: [
'ts-loader',
]
}
],
},
plugins: [
new ESLintPlugin(
{
extensions: [".ts"],
}
),
new CopyPlugin({
patterns: [
{ from: "node_modules/moment/min/moment.min.js", to: "lib/moment.min.js" }
],
}),
],
resolve: {
extensions: ['.ts', '.js'],
},
optimization: {
minimize: false
},
externals: {
moment: 'moment',
},
};