-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.ts
58 lines (54 loc) · 1.24 KB
/
webpack.config.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import webpack from "webpack";
import path from "path";
import fs from "fs";
import WebpackUserscript from 'webpack-userscript';
const config: webpack.Configuration = {
entry: "./src/index.ts",
optimization: {
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: {
loader: "ts-loader",
options: {
transpileOnly: true
}
}
}]
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "script.user.js"
},
resolve: {
modules: [
"node_modules",
"src"
],
extensions: [".ts", ".js"],
},
plugins: [
new WebpackUserscript({
headers: {
name: 'Vk music downloader',
version: `${new Date().getDate()}.${new Date().getMonth()+1}.${new Date().getFullYear()}.${new Date().getHours()}.${new Date().getMinutes()}`,
match: '*://*.vk.com/*',
grant: [
'GM_setValue',
'GM_getValue'
],
require: [],
"run-at":'document-body'
},
pretty: false,
proxyScript: {
baseUrl: 'http://127.0.0.1:8080',
filename: 'script.proxy.user.js',
enable: true
}
})
],
};
export default config;