-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
43 lines (41 loc) · 957 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
const path = require('path');
const WebpackUserscript = require('webpack-userscript');
const headers = {
name: 'AM2 Assist',
namespace: 'http://tampermonkey.net',
contributor: ['henryzhou', 'jiak94'],
license: 'MIT',
match: ['http://www.airlines-manager.com/*', 'https://www.airlines-manager.com/*'],
updateURL: 'https://github.com/statm/am2-assist/releases/download/latest/AM2_Assist.user.js',
};
module.exports = {
mode: 'production',
entry: './src/index.ts',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'AM2_Assist.user.js',
},
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
enforce: 'pre',
loader: 'eslint-loader',
exclude: /node_modules/,
},
{
test: /\.ts$/,
loader: 'ts-loader',
},
],
},
plugins: [
new WebpackUserscript({
headers,
metajs: false,
}),
],
};