2024-04-25 22:39:26 +00:00
|
|
|
const path = require('path');
|
|
|
|
const { UserscriptPlugin } = require('webpack-userscript');
|
|
|
|
|
2024-04-25 22:51:36 +00:00
|
|
|
|
2024-04-25 22:39:26 +00:00
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.ts',
|
2024-04-25 22:51:36 +00:00
|
|
|
mode: 'production',
|
2024-04-25 22:39:26 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new UserscriptPlugin({
|
|
|
|
headers: {
|
|
|
|
name: "ScoreSaber Utils",
|
|
|
|
"run-at": "document-end",
|
2024-04-25 22:51:36 +00:00
|
|
|
match: "https://scoresaber.com/*",
|
|
|
|
updateURL: "https://ssu.fascinated.cc/scripts/bundle.user.js",
|
|
|
|
downloadURL: "https://ssu.fascinated.cc/scripts/bundle.user.js",
|
|
|
|
require: ["https://ssu.fascinated.cc/scripts/bundle.meta.js"],
|
|
|
|
version: `1.0.0-${process.env.GIT_REV || 'dev'}`,
|
2024-04-25 22:39:26 +00:00
|
|
|
}
|
|
|
|
})
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
},
|
|
|
|
};
|