-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
34 lines (32 loc) · 1.11 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
/* eslint-env node */
const path = require('path');
const WebpackUserscript = require('webpack-userscript');
const { name, scriptName, description, repository } = require('./package.json');
const dev = process.argv.includes('--dev');
module.exports = {
mode: dev ? 'development' : 'production',
entry: path.resolve(__dirname, 'src', 'index.js'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: `${name}.user.js`,
// libraryTarget: 'this',
},
plugins: [
new WebpackUserscript({
headers: {
name: scriptName,
description,
namespace: 'https://uc.feildmaster.com/',
match: 'https://*.undercards.net/*',
exclude: 'https://*.undercards.net/*/*',
updateURL: `https://github.com/${repository}/releases/latest/download/${name}.meta.js`,
downloadURL: `https://github.com/${repository}/releases/latest/download/${name}.user.js`,
require: [ // URLS of files to require
'https://raw.githubusercontent.com/UCProjects/UnderScript/master/src/checkerV2.js',
],
grant: 'none',
},
pretty: true,
}),
],
};