Convert defines to boolean

Fixes disabling features as `USE_SYSTEM_FONTS=0`.
This commit is contained in:
Dmitry Lyzo 2024-08-15 20:36:41 +03:00
parent aff5d941ef
commit 2d8d23d646
2 changed files with 4 additions and 4 deletions

4
src/global.d.ts vendored
View File

@ -19,6 +19,6 @@ export declare global {
const __JF_BUILD_VERSION__: string;
const __PACKAGE_JSON_NAME__: string;
const __PACKAGE_JSON_VERSION__: string;
const __USE_SYSTEM_FONTS__: string;
const __WEBPACK_SERVE__: string;
const __USE_SYSTEM_FONTS__: boolean;
const __WEBPACK_SERVE__: boolean;
}

View File

@ -63,8 +63,8 @@ const config = {
process.env.JELLYFIN_VERSION || 'Release'),
__PACKAGE_JSON_NAME__: JSON.stringify(packageJson.name),
__PACKAGE_JSON_VERSION__: JSON.stringify(packageJson.version),
__USE_SYSTEM_FONTS__: JSON.stringify(!!process.env.USE_SYSTEM_FONTS),
__WEBPACK_SERVE__: JSON.stringify(!!process.env.WEBPACK_SERVE)
__USE_SYSTEM_FONTS__: !!JSON.parse(process.env.USE_SYSTEM_FONTS || '0'),
__WEBPACK_SERVE__: !!JSON.parse(process.env.WEBPACK_SERVE || '0')
}),
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({