Lookup themes dynamically
This commit is contained in:
+3
-15
@@ -1,23 +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, {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
'main.jellyfin': './index.jsx',
|
||||
'serviceworker': './serviceworker.js',
|
||||
...THEMES.reduce((acc, theme) => {
|
||||
acc[`themes/${theme}`] = `./themes/${theme}/theme.scss`;
|
||||
return acc;
|
||||
}, {})
|
||||
...common.entry,
|
||||
'serviceworker': './serviceworker.js'
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user