fix(deploy): 誤ったファイルがキャッシュされ新しいバージョンにアップデートされない問題の修正 (#125)

This commit is contained in:
まっちゃとーにゅ 2023-07-29 07:26:34 +09:00 committed by GitHub
parent eb7461c2e1
commit 0f4bad8c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@
import * as fs from 'node:fs'; import * as fs from 'node:fs';
import gulp from 'gulp'; import gulp from 'gulp';
import rename from 'gulp-rename';
import replace from 'gulp-replace'; import replace from 'gulp-replace';
import terser from 'gulp-terser'; import terser from 'gulp-terser';
import cssnano from 'gulp-cssnano'; import cssnano from 'gulp-cssnano';
@ -47,6 +48,7 @@ gulp.task('build:backend:script', () => {
.pipe(terser({ .pipe(terser({
toplevel: true toplevel: true
})) }))
.pipe(rename({ suffix: `.${meta.version}` }))
.pipe(gulp.dest('./built/_frontend_dist_/')); .pipe(gulp.dest('./built/_frontend_dist_/'));
}); });

View File

@ -63,7 +63,7 @@ html
style style
include ../style.css include ../style.css
script(src=`/assets/boot.js?v=${version}`) script(src=`/assets/boot.${version}.js`)
body body
noscript: p noscript: p

View File

@ -8,7 +8,7 @@ html
title Misskey Repair Tool title Misskey Repair Tool
style style
include ../bios.css include ../bios.css
script(src=`/assets/bios.js?v=${version}`) script(src=`/assets/bios.${version}.js`)
body body
header header

View File

@ -8,7 +8,7 @@ html
title Misskey Cli title Misskey Cli
style style
include ../cli.css include ../cli.css
script(src=`/assets/cli.js?v=${version}`) script(src=`/assets/cli.${version}.js`)
body body
header header

View File

@ -2,4 +2,4 @@ doctype html
html html
#msg #msg
script(src=`/assets/flush.js?v=${version}`) script(src=`/assets/flush.${version}.js`)