ScoreSaberUtils-Script/webpack.config.js

38 lines
935 B
JavaScript
Raw Normal View History

2024-04-25 22:39:26 +00:00
const path = require('path');
const { UserscriptPlugin } = require('webpack-userscript');
2024-04-25 22:39:26 +00:00
module.exports = {
entry: './src/index.ts',
2024-04-25 23:09:20 +00:00
mode: process.env.NODE_ENV || 'development',
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({
2024-04-25 22:59:36 +00:00
metajs: false,
2024-04-25 23:12:22 +00:00
downloadBaseURL: 'https://ssu.fascinated.cc/scripts/',
updateBaseURL: 'https://ssu.fascinated.cc/scripts/',
2024-04-25 22:39:26 +00:00
headers: {
name: "ScoreSaber Utils",
2024-04-25 23:04:19 +00:00
author: "fascinated7 (discord)",
2024-04-25 22:39:26 +00:00
"run-at": "document-end",
match: "https://scoresaber.com/*",
version: `1.0.0-${process.env.GIT_REV ? process.env.GIT_REV.substring(0, 7) : "dev"}`,
2024-04-25 22:39:26 +00:00
}
})
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};