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:
parent
a768ca3037
commit
fe6b43d586
5 changed files with 17 additions and 32 deletions
|
@ -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: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue