mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 18:08:17 -07:00
removed import for config.json for fetch
This commit is contained in:
parent
9030aa2817
commit
723a19cd8b
@ -43,9 +43,16 @@ async function fetchLocal(url, options) {
|
||||
async function getConfig() {
|
||||
if (data) return Promise.resolve(data);
|
||||
try {
|
||||
data = (await import('../../config.json')).default;
|
||||
const response = await fetchLocal('config.json', {
|
||||
cache: 'no-cache'
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('network response was not ok');
|
||||
}
|
||||
|
||||
data = await response.json();
|
||||
|
||||
console.dir(data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.warn('failed to fetch the web config file:', error);
|
||||
@ -55,9 +62,15 @@ async function getConfig() {
|
||||
|
||||
async function getDefaultConfig() {
|
||||
try {
|
||||
data = (await import('../../config.template.json')).default;
|
||||
const response = await fetchLocal('config.template.json', {
|
||||
cache: 'no-cache'
|
||||
});
|
||||
|
||||
console.dir(data);
|
||||
if (!response.ok) {
|
||||
throw new Error('network response was not ok');
|
||||
}
|
||||
|
||||
data = await response.json();
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error('failed to fetch the default web config file:', error);
|
||||
|
@ -15,6 +15,10 @@ module.exports = {
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: 'config*.json',
|
||||
to: ''
|
||||
},
|
||||
{
|
||||
from: 'themes/',
|
||||
to: 'themes/'
|
||||
|
Loading…
Reference in New Issue
Block a user