refresh locales after any change, not just a version update
This commit is contained in:
parent
45974a53f8
commit
652cc8602c
8 changed files with 41 additions and 31 deletions
|
|
@ -2,7 +2,7 @@ import path from 'path';
|
|||
import pluginReplace from '@rollup/plugin-replace';
|
||||
import pluginVue from '@vitejs/plugin-vue';
|
||||
import { type UserConfig, defineConfig } from 'vite';
|
||||
|
||||
import { localesVersion } from '../../locales/version.js';
|
||||
import locales from '../../locales/index.js';
|
||||
import meta from '../../package.json';
|
||||
import packageInfo from './package.json' with { type: 'json' };
|
||||
|
|
@ -110,6 +110,7 @@ export function getConfig(): UserConfig {
|
|||
define: {
|
||||
_VERSION_: JSON.stringify(meta.version),
|
||||
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])),
|
||||
_LANGS_VERSION_: JSON.stringify(localesVersion),
|
||||
_ENV_: JSON.stringify(process.env.NODE_ENV),
|
||||
_DEV_: process.env.NODE_ENV !== 'production',
|
||||
_PERF_PREFIX_: JSON.stringify('Misskey:'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue