1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Lookup themes dynamically

This commit is contained in:
Bill Thornton 2025-03-25 15:36:32 -04:00
parent a768ca3037
commit fe6b43d586
5 changed files with 17 additions and 32 deletions

View file

@ -1,26 +1,11 @@
const common = require('./webpack.common');
const { merge } = require('webpack-merge');
const THEMES = [
'appletv',
'blueradiance',
'dark',
'light',
'purplehaze',
'wmc'
];
const common = require('./webpack.common');
module.exports = merge(common, {
// In order for live reload to work we must use "web" as the target not "browserslist"
target: process.env.WEBPACK_SERVE ? 'web' : 'browserslist',
mode: 'development',
entry: {
'main.jellyfin': './index.jsx',
...THEMES.reduce((acc, theme) => {
acc[`themes/${theme}`] = `./themes/${theme}/theme.scss`;
return acc;
}, {})
},
devtool: 'eval-cheap-module-source-map',
module: {
rules: [