mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-01-15 16:33:35 -03:00
Update webpack config to build sass themes
This commit is contained in:
@@ -1,11 +1,26 @@
|
||||
const common = require('./webpack.common');
|
||||
const { merge } = require('webpack-merge');
|
||||
|
||||
const THEMES = [
|
||||
'appletv',
|
||||
'blueradiance',
|
||||
'dark',
|
||||
'light',
|
||||
'purplehaze',
|
||||
'wmc'
|
||||
];
|
||||
|
||||
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' },
|
||||
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: [
|
||||
|
||||
Reference in New Issue
Block a user