diff --git a/gulpfile.mjs b/gulpfile.mjs index 16d48c1ddc..aaa96cf4d1 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -4,6 +4,7 @@ import * as fs from 'node:fs'; import gulp from 'gulp'; +import rename from 'gulp-rename'; import replace from 'gulp-replace'; import terser from 'gulp-terser'; import cssnano from 'gulp-cssnano'; @@ -47,6 +48,7 @@ gulp.task('build:backend:script', () => { .pipe(terser({ toplevel: true })) + .pipe(rename({ suffix: `.${meta.version}` })) .pipe(gulp.dest('./built/_frontend_dist_/')); }); diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 70d9c06861..2cfdb2a1cf 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -63,7 +63,7 @@ html style include ../style.css - script(src=`/assets/boot.js?v=${version}`) + script(src=`/assets/boot.${version}.js`) body noscript: p diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 54706b9c90..196c57bc1d 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -8,7 +8,7 @@ html title Misskey Repair Tool style include ../bios.css - script(src=`/assets/bios.js?v=${version}`) + script(src=`/assets/bios.${version}.js`) body header diff --git a/packages/backend/src/server/web/views/cli.pug b/packages/backend/src/server/web/views/cli.pug index 51d45cefd3..b3f7009dd5 100644 --- a/packages/backend/src/server/web/views/cli.pug +++ b/packages/backend/src/server/web/views/cli.pug @@ -8,7 +8,7 @@ html title Misskey Cli style include ../cli.css - script(src=`/assets/cli.js?v=${version}`) + script(src=`/assets/cli.${version}.js`) body header diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index 2ce426ae1d..9dafdc81ab 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -2,4 +2,4 @@ doctype html html #msg - script(src=`/assets/flush.js?v=${version}`) + script(src=`/assets/flush.${version}.js`)