各種アセットの出力ファイル名に Misskey 本体のバージョンを含めるようにする (MisskeyIO#305)
This commit is contained in:
parent
769830c6de
commit
436ddb8fdb
|
@ -36,7 +36,7 @@ html
|
||||||
link(rel='prefetch' href=infoImageUrl)
|
link(rel='prefetch' href=infoImageUrl)
|
||||||
link(rel='prefetch' href=notFoundImageUrl)
|
link(rel='prefetch' href=notFoundImageUrl)
|
||||||
//- https://github.com/misskey-dev/misskey/issues/9842
|
//- https://github.com/misskey-dev/misskey/issues/9842
|
||||||
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.44.0')
|
link(rel='stylesheet' href=`/assets/tabler-icons.${version}/tabler-icons.min.css`)
|
||||||
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
|
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
|
||||||
|
|
||||||
if !config.clientManifestExists
|
if !config.clientManifestExists
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { setWasm, setCDN, Highlighter, getHighlighter as _getHighlighter } from 'shiki';
|
import { setWasm, setCDN, Highlighter, getHighlighter as _getHighlighter } from 'shiki';
|
||||||
|
import { version } from '@/config.js';
|
||||||
|
|
||||||
setWasm('/assets/shiki/dist/onig.wasm');
|
setWasm(`/assets/shiki.${version}/dist/onig.wasm`);
|
||||||
setCDN('/assets/shiki/');
|
setCDN(`/assets/shiki.${version}/`);
|
||||||
|
|
||||||
let _highlighter: Highlighter | null = null;
|
let _highlighter: Highlighter | null = null;
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,9 @@ export function getConfig(): UserConfig {
|
||||||
vue: ['vue'],
|
vue: ['vue'],
|
||||||
photoswipe: ['photoswipe', 'photoswipe/lightbox', 'photoswipe/style.css'],
|
photoswipe: ['photoswipe', 'photoswipe/lightbox', 'photoswipe/style.css'],
|
||||||
},
|
},
|
||||||
chunkFileNames: process.env.NODE_ENV === 'production' ? '[hash:8].js' : '[name]-[hash:8].js',
|
entryFileNames: `${meta.version}.[hash].js`,
|
||||||
assetFileNames: process.env.NODE_ENV === 'production' ? '[hash:8][extname]' : '[name]-[hash:8][extname]',
|
chunkFileNames: `${meta.version}.[hash].js`,
|
||||||
|
assetFileNames: `${meta.version}.[hash][extname]`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cssCodeSplit: true,
|
cssCodeSplit: true,
|
||||||
|
|
|
@ -20,7 +20,7 @@ async function copyFrontendFonts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyFrontendTablerIcons() {
|
async function copyFrontendTablerIcons() {
|
||||||
await fs.cp('./packages/frontend/node_modules/@tabler/icons-webfont', './built/_frontend_dist_/tabler-icons', { dereference: true, recursive: true });
|
await fs.cp('./packages/frontend/node_modules/@tabler/icons-webfont', `./built/_frontend_dist_/tabler-icons.${meta.version}`, { dereference: true, recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyFrontendLocales() {
|
async function copyFrontendLocales() {
|
||||||
|
@ -36,10 +36,10 @@ async function copyFrontendLocales() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyFrontendShikiAssets() {
|
async function copyFrontendShikiAssets() {
|
||||||
await fs.cp('./packages/frontend/node_modules/shiki/dist', './built/_frontend_dist_/shiki/dist', { dereference: true, recursive: true });
|
await fs.cp('./packages/frontend/node_modules/shiki/dist', `./built/_frontend_dist_/shiki.${meta.version}/dist`, { dereference: true, recursive: true });
|
||||||
await fs.cp('./packages/frontend/node_modules/shiki/languages', './built/_frontend_dist_/shiki/languages', { dereference: true, recursive: true });
|
await fs.cp('./packages/frontend/node_modules/shiki/languages', `./built/_frontend_dist_/shiki.${meta.version}/languages`, { dereference: true, recursive: true });
|
||||||
await fs.cp('./packages/frontend/node_modules/aiscript-vscode/aiscript/syntaxes', './built/_frontend_dist_/shiki/languages', { dereference: true, recursive: true });
|
await fs.cp('./packages/frontend/node_modules/aiscript-vscode/aiscript/syntaxes', `./built/_frontend_dist_/shiki.${meta.version}/languages`, { dereference: true, recursive: true });
|
||||||
await fs.cp('./packages/frontend/node_modules/shiki/themes', './built/_frontend_dist_/shiki/themes', { dereference: true, recursive: true });
|
await fs.cp('./packages/frontend/node_modules/shiki/themes', `./built/_frontend_dist_/shiki.${meta.version}/themes`, { dereference: true, recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyBackendViews() {
|
async function copyBackendViews() {
|
||||||
|
|
Loading…
Reference in New Issue