-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
46 lines (45 loc) · 1.37 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
const path = require('path')
const { UserscriptPlugin } = require('webpack-userscript')
const dev = process.env.NODE_ENV === 'development'
module.exports = {
mode: dev ? 'development' : 'production',
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
filename: 'eui.js',
path: path.resolve(__dirname, 'dist'),
},
devtool: false,
plugins: [new UserscriptPlugin({
headers: {
name: 'SBG Enhanced UI',
namespace: 'https://github.com/egorantonov/sbg-enhanced',
downloadURL: 'https://github.com/egorantonov/sbg-enhanced/releases/latest/download/eui.user.js',
updateURL: 'https://github.com/egorantonov/sbg-enhanced/releases/latest/download/eui.user.js',
description: 'Enhanced UI for SBG',
author: 'https://github.com/egorantonov',
match: 'https://sbg-game.ru/app/*',
iconURL: 'https://raw.githubusercontent.com/egorantonov/sbg-enhanced/master/assets/script/64.png',
icon64URL: 'https://raw.githubusercontent.com/egorantonov/sbg-enhanced/master/assets/script/64.png',
grant: 'none'
}
})],
module: {
rules: [
{
test: /\.css$/,
use: [
'to-string-loader',
'css-loader'
]
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
}