ScoreSaberUtils-Script/webpack.config.js

37 lines
906 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',
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",
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'),
},
};