-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
48 lines (46 loc) · 1.26 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
const webpack = require('webpack');
const path = require('path');
const pkg = require('./package.json');
module.exports = {
entry: {
index: path.join(__dirname, 'index.ts'),
'index.min': path.join(__dirname, 'index.ts'),
},
output: {
path: path.join(__dirname, '/dist'),
filename: '[name].user.js',
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.ts'],
},
module: {
rules: [{ test: /\.tsx?$/, loader: 'ts-loader' }],
},
mode: 'none',
optimization: {
minimize: false,
concatenateModules: true,
},
plugins: [
new webpack.BannerPlugin({
banner: `// ==UserScript==
// @name WaniKani Vocab Beyond
// @author ${pkg.author}
// @description ${pkg.description}
// @version ${pkg.version}
// @update ${new Date().toLocaleString()}
// @grant GM_xmlhttpRequest
// @include https://www.wanikani.com/*
// @run-at document-start
// @namespace https://greasyfork.org/en/users/56591-normful
// @connect nihongo.monash.edu
// @connect apifree.forvo.com
// @license The MIT License (MIT); http://opensource.org/licenses/MIT
// ==/UserScript==
`,
entryOnly: true,
raw: true,
}),
],
};